[][src]Struct cbor::encoder::Encoder

pub struct Encoder<W> { /* fields omitted */ }

The actual encoder type definition

Implementations

impl<W: WriteBytesExt> Encoder<W>[src]

pub fn new(w: W) -> Encoder<W>[src]

pub fn into_writer(self) -> W[src]

pub fn writer(&mut self) -> &mut W[src]

pub fn u8(&mut self, x: u8) -> EncodeResult[src]

pub fn u16(&mut self, x: u16) -> EncodeResult[src]

pub fn u32(&mut self, x: u32) -> EncodeResult[src]

pub fn u64(&mut self, x: u64) -> EncodeResult[src]

pub fn i8(&mut self, x: i8) -> EncodeResult[src]

pub fn i16(&mut self, x: i16) -> EncodeResult[src]

pub fn i32(&mut self, x: i32) -> EncodeResult[src]

pub fn i64(&mut self, x: i64) -> EncodeResult[src]

pub fn int(&mut self, x: Int) -> EncodeResult[src]

pub fn f32(&mut self, x: f32) -> EncodeResult[src]

pub fn f64(&mut self, x: f64) -> EncodeResult[src]

pub fn bool(&mut self, x: bool) -> EncodeResult[src]

pub fn simple(&mut self, x: Simple) -> EncodeResult[src]

pub fn bytes(&mut self, x: &[u8]) -> EncodeResult[src]

pub fn bytes_iter<'r, I: Iterator<Item = &'r [u8]>>(
    &mut self,
    iter: I
) -> EncodeResult
[src]

Indefinite byte string encoding. (RFC 7049 section 2.2.2)

pub fn text(&mut self, x: &str) -> EncodeResult[src]

pub fn text_iter<'r, I: Iterator<Item = &'r str>>(
    &mut self,
    iter: I
) -> EncodeResult
[src]

Indefinite string encoding. (RFC 7049 section 2.2.2)

pub fn null(&mut self) -> EncodeResult[src]

pub fn undefined(&mut self) -> EncodeResult[src]

pub fn tag(&mut self, x: Tag) -> EncodeResult[src]

pub fn array(&mut self, len: usize) -> EncodeResult[src]

pub fn array_begin(&mut self) -> EncodeResult[src]

Indefinite array encoding. (RFC 7049 section 2.2.1)

pub fn array_end(&mut self) -> EncodeResult[src]

End of indefinite array encoding. (RFC 7049 section 2.2.1)

pub fn object(&mut self, len: usize) -> EncodeResult[src]

pub fn object_begin(&mut self) -> EncodeResult[src]

Indefinite object encoding. (RFC 7049 section 2.2.1)

pub fn object_end(&mut self) -> EncodeResult[src]

End of indefinite object encoding. (RFC 7049 section 2.2.1)

Auto Trait Implementations

impl<W> RefUnwindSafe for Encoder<W> where
    W: RefUnwindSafe
[src]

impl<W> Send for Encoder<W> where
    W: Send
[src]

impl<W> Sync for Encoder<W> where
    W: Sync
[src]

impl<W> Unpin for Encoder<W> where
    W: Unpin
[src]

impl<W> UnwindSafe for Encoder<W> where
    W: UnwindSafe
[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.