sval_nested

Trait StreamRecord

source
pub trait StreamRecord<'sval> {
    type Ok;

    // Required methods
    fn value_computed<V: Value>(
        &mut self,
        tag: Option<Tag>,
        label: Label<'_>,
        value: V,
    ) -> Result;
    fn end(self) -> Result<Self::Ok>;

    // Provided methods
    fn value<V: ValueRef<'sval>>(
        &mut self,
        tag: Option<Tag>,
        label: Label<'_>,
        value: V,
    ) -> Result { ... }
    fn value_ref<V: Value + ?Sized>(
        &mut self,
        tag: Option<Tag>,
        label: Label<'_>,
        value: &'sval V,
    ) -> Result { ... }
}
Expand description

A stream for a record.

Required Associated Types§

source

type Ok

The type of value produced by this stream on completion.

Required Methods§

source

fn value_computed<V: Value>( &mut self, tag: Option<Tag>, label: Label<'_>, value: V, ) -> Result

Stream a record field, borrowed for an arbitrarily short lifetime.

source

fn end(self) -> Result<Self::Ok>

Complete the record.

Provided Methods§

source

fn value<V: ValueRef<'sval>>( &mut self, tag: Option<Tag>, label: Label<'_>, value: V, ) -> Result

Stream a record field.

source

fn value_ref<V: Value + ?Sized>( &mut self, tag: Option<Tag>, label: Label<'_>, value: &'sval V, ) -> Result

Stream a reference to a record field.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'sval, Ok> StreamRecord<'sval> for Unsupported<Ok>

source§

type Ok = Ok