Trait minicbor::bytes::EncodeBytes

source ·
pub trait EncodeBytes {
    // Required method
    fn encode_bytes<W: Write>(
        &self,
        e: &mut Encoder<W>,
    ) -> Result<(), Error<W::Error>>;

    // Provided method
    fn is_nil(&self) -> bool { ... }
}
Expand description

Like Encode but specific for encoding of byte slices.

Required Methods§

source

fn encode_bytes<W: Write>( &self, e: &mut Encoder<W>, ) -> Result<(), Error<W::Error>>

Provided Methods§

source

fn is_nil(&self) -> bool

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl EncodeBytes for Vec<u8>

source§

fn encode_bytes<W: Write>( &self, e: &mut Encoder<W>, ) -> Result<(), Error<W::Error>>

source§

impl EncodeBytes for [u8]

source§

fn encode_bytes<W: Write>( &self, e: &mut Encoder<W>, ) -> Result<(), Error<W::Error>>

source§

impl<'a, T: EncodeBytes + ?Sized> EncodeBytes for &'a T

source§

fn encode_bytes<W: Write>( &self, e: &mut Encoder<W>, ) -> Result<(), Error<W::Error>>

source§

impl<T: EncodeBytes> EncodeBytes for Option<T>

source§

fn encode_bytes<W: Write>( &self, e: &mut Encoder<W>, ) -> Result<(), Error<W::Error>>

source§

fn is_nil(&self) -> bool

source§

impl<const N: usize> EncodeBytes for [u8; N]

source§

fn encode_bytes<W: Write>( &self, e: &mut Encoder<W>, ) -> Result<(), Error<W::Error>>

Implementors§