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

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

The actual encoder type definition

Methods

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

fn new(w: W) -> Encoder<W>

fn into_writer(self) -> W

fn writer(&mut self) -> &mut W

fn u8(&mut self, x: u8) -> EncodeResult

fn u16(&mut self, x: u16) -> EncodeResult

fn u32(&mut self, x: u32) -> EncodeResult

fn u64(&mut self, x: u64) -> EncodeResult

fn i8(&mut self, x: i8) -> EncodeResult

fn i16(&mut self, x: i16) -> EncodeResult

fn i32(&mut self, x: i32) -> EncodeResult

fn i64(&mut self, x: i64) -> EncodeResult

fn int(&mut self, x: Int) -> EncodeResult

fn f32(&mut self, x: f32) -> EncodeResult

fn f64(&mut self, x: f64) -> EncodeResult

fn bool(&mut self, x: bool) -> EncodeResult

fn simple(&mut self, x: Simple) -> EncodeResult

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

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

Indefinite byte string encoding. (RFC 7049 section 2.2.2)

fn text(&mut self, x: &str) -> EncodeResult

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

Indefinite string encoding. (RFC 7049 section 2.2.2)

fn null(&mut self) -> EncodeResult

fn undefined(&mut self) -> EncodeResult

fn tag(&mut self, x: Tag) -> EncodeResult

fn array(&mut self, len: usize) -> EncodeResult

fn array_begin(&mut self) -> EncodeResult

Indefinite array encoding. (RFC 7049 section 2.2.1)

fn array_end(&mut self) -> EncodeResult

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

fn object(&mut self, len: usize) -> EncodeResult

fn object_begin(&mut self) -> EncodeResult

Indefinite object encoding. (RFC 7049 section 2.2.1)

fn object_end(&mut self) -> EncodeResult

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