Struct wasmbus_rpc::cbor::Encoder
source · [−]Fields
inner: Encoder<W>
Implementations
sourceimpl<W: Write> Encoder<W> where
RpcError: From<Error<<W as Write>::Error>>,
impl<W: Write> Encoder<W> where
RpcError: From<Error<<W as Write>::Error>>,
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> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more