[][src]Trait sval::stream::Stream

pub trait Stream {
    fn fmt(&mut self, args: Arguments) -> Result<(), Error>;

    fn begin(&mut self) -> Result<(), Error> { ... }
fn i64(&mut self, v: i64) -> Result<(), Error> { ... }
fn u64(&mut self, v: u64) -> Result<(), Error> { ... }
fn i128(&mut self, v: i128) -> Result<(), Error> { ... }
fn u128(&mut self, v: u128) -> Result<(), Error> { ... }
fn f64(&mut self, v: f64) -> Result<(), Error> { ... }
fn bool(&mut self, v: bool) -> Result<(), Error> { ... }
fn char(&mut self, v: char) -> Result<(), Error> { ... }
fn str(&mut self, v: &str) -> Result<(), Error> { ... }
fn none(&mut self) -> Result<(), Error> { ... }
fn map_begin(&mut self, len: Option<usize>) -> Result<(), Error> { ... }
fn map_key(&mut self) -> Result<(), Error> { ... }
fn map_value(&mut self) -> Result<(), Error> { ... }
fn map_end(&mut self) -> Result<(), Error> { ... }
fn seq_begin(&mut self, len: Option<usize>) -> Result<(), Error> { ... }
fn seq_elem(&mut self) -> Result<(), Error> { ... }
fn seq_end(&mut self) -> Result<(), Error> { ... }
fn end(&mut self) -> Result<(), Error> { ... } }

A value stream.

The Stream trait has a flat, stateless structure, but it may need to work with nested values. Implementations can use a Stack to track state for them.

Required methods

fn fmt(&mut self, args: Arguments) -> Result<(), Error>

Stream a format.

Loading content...

Provided methods

fn begin(&mut self) -> Result<(), Error>

Begin the stream.

This method must be called before interacting with the stream in any other way.

fn i64(&mut self, v: i64) -> Result<(), Error>

Stream a signed integer.

fn u64(&mut self, v: u64) -> Result<(), Error>

Stream an unsigned integer.

fn i128(&mut self, v: i128) -> Result<(), Error>

Stream a 128bit signed integer.

fn u128(&mut self, v: u128) -> Result<(), Error>

Stream a 128bit unsigned integer.

fn f64(&mut self, v: f64) -> Result<(), Error>

Stream a floating point value.

fn bool(&mut self, v: bool) -> Result<(), Error>

Stream a boolean.

fn char(&mut self, v: char) -> Result<(), Error>

Stream a unicode character.

fn str(&mut self, v: &str) -> Result<(), Error>

Stream a UTF-8 string slice.

fn none(&mut self) -> Result<(), Error>

Stream an empty value.

fn map_begin(&mut self, len: Option<usize>) -> Result<(), Error>

Begin a map.

fn map_key(&mut self) -> Result<(), Error>

Begin a map key.

The key will be implicitly ended by the stream methods that follow it.

fn map_value(&mut self) -> Result<(), Error>

Begin a map value.

The value will be implicitly ended by the stream methods that follow it.

fn map_end(&mut self) -> Result<(), Error>

End a map.

fn seq_begin(&mut self, len: Option<usize>) -> Result<(), Error>

Begin a sequence.

fn seq_elem(&mut self) -> Result<(), Error>

Begin a sequence element.

The element will be implicitly ended by the stream methods that follow it.

fn seq_end(&mut self) -> Result<(), Error>

End a sequence.

fn end(&mut self) -> Result<(), Error>

End the stream.

Loading content...

Implementations on Foreign Types

impl<'a, T: ?Sized> Stream for &'a mut T where
    T: Stream
[src]

Loading content...

Implementors

Loading content...