[][src]Struct sval::stream::RefMutStream

pub struct RefMutStream<'a>(_);

A borrowed stream wrapper.

This is the result of calling OwnedStream.borrow_mut.

Implementations

impl<'a> RefMutStream<'a>[src]

pub fn any(&mut self, v: impl Value) -> Result[src]

Stream a value.

pub fn debug(&mut self, v: impl Debug) -> Result[src]

Stream a debuggable type.

pub fn display(&mut self, v: impl Display) -> Result[src]

Stream a displayable type.

pub fn error(&mut self, v: &(dyn Error + 'static)) -> Result[src]

Stream an error.

This method is only available when the std feature is enabled.

Examples

Errors that don't satisfy the trait bounds needed by this method can go through Source:

impl Value for MyError {
    fn stream(&self, stream: &mut value::Stream) -> value::Result {
        use sval::stream::Source;

        stream.any(Source::new(&self.error))
    }
}

pub fn i64(&mut self, v: i64) -> Result[src]

Stream a signed integer.

pub fn u64(&mut self, v: u64) -> Result[src]

Stream an unsigned integer.

pub fn i128(&mut self, v: i128) -> Result[src]

Stream a 128-bit signed integer.

pub fn u128(&mut self, v: u128) -> Result[src]

Stream a 128-bit unsigned integer.

pub fn f64(&mut self, v: f64) -> Result[src]

Stream a floating point value.

pub fn bool(&mut self, v: bool) -> Result[src]

Stream a boolean.

pub fn char(&mut self, v: char) -> Result[src]

Stream a unicode character.

pub fn str(&mut self, v: &str) -> Result[src]

Stream a UTF8 string.

pub fn none(&mut self) -> Result[src]

Stream an empty value.

pub fn map_begin(&mut self, len: Option<usize>) -> Result[src]

Begin a map.

pub fn map_key(&mut self, k: impl Value) -> Result[src]

Stream a map key.

pub fn map_value(&mut self, v: impl Value) -> Result[src]

Stream a map value.

pub fn map_end(&mut self) -> Result[src]

End a map.

pub fn seq_begin(&mut self, len: Option<usize>) -> Result[src]

Begin a sequence.

pub fn seq_elem(&mut self, v: impl Value) -> Result[src]

Stream a sequence element.

pub fn seq_end(&mut self) -> Result[src]

End a sequence.

impl<'a> RefMutStream<'a>[src]

pub fn map_key_begin(&mut self) -> Result<&mut Self, Error>[src]

Begin a map key.

pub fn map_value_begin(&mut self) -> Result<&mut Self, Error>[src]

Begin a map value.

pub fn seq_elem_begin(&mut self) -> Result<&mut Self, Error>[src]

Begin a sequence element.

Trait Implementations

impl<'a> Stream for RefMutStream<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for RefMutStream<'a>[src]

impl<'a> !Send for RefMutStream<'a>[src]

impl<'a> !Sync for RefMutStream<'a>[src]

impl<'a> Unpin for RefMutStream<'a>[src]

impl<'a> !UnwindSafe for RefMutStream<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.