Struct probor::Encoder
[−]
pub struct Encoder<W> { /* fields omitted */ }
The actual encoder type definition
Methods
impl<W> Encoder<W> where W: WriteBytesExt
fn new(w: W) -> Encoder<W>
fn into_writer(self) -> W
fn writer(&mut self) -> &mut W
fn u8(&mut self, x: u8) -> Result<(), EncodeError>
fn u16(&mut self, x: u16) -> Result<(), EncodeError>
fn u32(&mut self, x: u32) -> Result<(), EncodeError>
fn u64(&mut self, x: u64) -> Result<(), EncodeError>
fn i8(&mut self, x: i8) -> Result<(), EncodeError>
fn i16(&mut self, x: i16) -> Result<(), EncodeError>
fn i32(&mut self, x: i32) -> Result<(), EncodeError>
fn i64(&mut self, x: i64) -> Result<(), EncodeError>
fn int(&mut self, x: Int) -> Result<(), EncodeError>
fn f32(&mut self, x: f32) -> Result<(), EncodeError>
fn f64(&mut self, x: f64) -> Result<(), EncodeError>
fn bool(&mut self, x: bool) -> Result<(), EncodeError>
fn simple(&mut self, x: Simple) -> Result<(), EncodeError>
fn bytes(&mut self, x: &[u8]) -> Result<(), EncodeError>
fn bytes_iter<'r, I>(&mut self, iter: I) -> Result<(), EncodeError> where I: Iterator<Item=&'r [u8]>
Indefinite byte string encoding. (RFC 7049 section 2.2.2)
fn text(&mut self, x: &str) -> Result<(), EncodeError>
fn text_iter<'r, I>(&mut self, iter: I) -> Result<(), EncodeError> where I: Iterator<Item=&'r str>
Indefinite string encoding. (RFC 7049 section 2.2.2)
fn null(&mut self) -> Result<(), EncodeError>
fn undefined(&mut self) -> Result<(), EncodeError>
fn tag(&mut self, x: Tag) -> Result<(), EncodeError>
fn array(&mut self, len: usize) -> Result<(), EncodeError>
fn array_begin(&mut self) -> Result<(), EncodeError>
Indefinite array encoding. (RFC 7049 section 2.2.1)
fn array_end(&mut self) -> Result<(), EncodeError>
End of indefinite array encoding. (RFC 7049 section 2.2.1)
fn object(&mut self, len: usize) -> Result<(), EncodeError>
fn object_begin(&mut self) -> Result<(), EncodeError>
Indefinite object encoding. (RFC 7049 section 2.2.1)
fn object_end(&mut self) -> Result<(), EncodeError>
End of indefinite object encoding. (RFC 7049 section 2.2.1)