[−][src]Struct cbor::encoder::Encoder
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]
&mut self,
iter: I
) -> EncodeResult
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]
&mut self,
iter: I
) -> EncodeResult
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]
W: RefUnwindSafe,
impl<W> Send for Encoder<W> where
W: Send,
[src]
W: Send,
impl<W> Sync for Encoder<W> where
W: Sync,
[src]
W: Sync,
impl<W> Unpin for Encoder<W> where
W: Unpin,
[src]
W: Unpin,
impl<W> UnwindSafe for Encoder<W> where
W: UnwindSafe,
[src]
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,