pub struct Encoder<W: Write> {
pub inner: Encoder<W>,
}Fields§
§inner: Encoder<W>Implementations§
Source§impl<W> Encoder<W>
A non-allocating CBOR encoder
impl<W> Encoder<W>
A non-allocating CBOR encoder
Sourcepub fn array(&mut self, len: u64) -> RpcResult<&mut Self>
pub fn array(&mut self, len: u64) -> RpcResult<&mut Self>
Begin encoding an array with len elements
Sourcepub fn begin_array(&mut self) -> RpcResult<&mut Self>
pub fn begin_array(&mut self) -> RpcResult<&mut Self>
Begin encoding an array with indefinite length
Sourcepub fn begin_map(&mut self) -> RpcResult<&mut Self>
pub fn begin_map(&mut self) -> RpcResult<&mut Self>
Begin encoding a map with indefinite length
Sourcepub fn begin_bytes(&mut self) -> RpcResult<&mut Self>
pub fn begin_bytes(&mut self) -> RpcResult<&mut Self>
Begin encoding a byte slice with indefinite length Use Encoder::end to terminate
Sourcepub fn begin_str(&mut self) -> RpcResult<&mut Self>
pub fn begin_str(&mut self) -> RpcResult<&mut Self>
Begin encoding an indefinite number of string slices Use Encoder::end to terminate
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Returns the inner writer
Auto Trait Implementations§
impl<W> Freeze for Encoder<W>where
W: Freeze,
impl<W> RefUnwindSafe for Encoder<W>where
W: RefUnwindSafe,
impl<W> Send for Encoder<W>where
W: Send,
impl<W> Sync for Encoder<W>where
W: Sync,
impl<W> Unpin for Encoder<W>where
W: Unpin,
impl<W> UnwindSafe for Encoder<W>where
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more