[][src]Struct sval::stream::OwnedStream

pub struct OwnedStream<S>(_);

An owned stream wrapper.

OwnedStream is an ergonomic wrapper over a raw Stream that makes it easier to stream complex types.

Methods

impl<S> OwnedStream<S> where
    S: Stream
[src]

pub fn stream(stream: S, value: impl Value) -> Result<S, Error>[src]

Stream a value.

pub fn new(stream: S) -> Self[src]

Begin an owned stream.

pub fn into_inner(self) -> S[src]

Unwrap the inner stream.

pub fn borrow_mut(&mut self) -> RefMutStream[src]

Get a reference to the stream that can be used by a value.

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

Stream a value.

pub fn fmt(&mut self, f: Arguments) -> Result[src]

Stream a format.

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<S> OwnedStream<S> where
    S: Stream
[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.

Auto Trait Implementations

impl<S> Send for OwnedStream<S> where
    S: Send

impl<S> Sync for OwnedStream<S> where
    S: Sync

impl<S> Unpin for OwnedStream<S> where
    S: Unpin

impl<S> UnwindSafe for OwnedStream<S> where
    S: UnwindSafe

impl<S> RefUnwindSafe for OwnedStream<S> where
    S: RefUnwindSafe

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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