pub trait SerWrite {
type Error;
// Required method
fn write(&mut self, buf: &[u8]) -> Result<(), Self::Error>;
// Provided methods
fn write_byte(&mut self, byte: u8) -> Result<(), Self::Error> { ... }
fn write_str(&mut self, s: &str) -> Result<(), Self::Error> { ... }
}
Expand description
Serializers should write data to the implementations of this trait.
Required Associated Types§
Required Methods§
Provided Methods§
Implementations on Foreign Types§
Source§impl<const CAP: usize> SerWrite for TinyVec<[u8; CAP]>
Available on crate feature tinyvec
and (crate features std
or alloc
) only.
impl<const CAP: usize> SerWrite for TinyVec<[u8; CAP]>
Available on crate feature
tinyvec
and (crate features std
or alloc
) only.Source§impl<const CAP: usize> SerWrite for ArrayVec<u8, CAP>
Available on crate feature arrayvec
only.
impl<const CAP: usize> SerWrite for ArrayVec<u8, CAP>
Available on crate feature
arrayvec
only.Source§impl<const CAP: usize> SerWrite for SmallVec<[u8; CAP]>
Available on crate feature smallvec
only.
impl<const CAP: usize> SerWrite for SmallVec<[u8; CAP]>
Available on crate feature
smallvec
only.Source§impl<const CAP: usize> SerWrite for ArrayVec<[u8; CAP]>
Available on crate feature tinyvec
only.
impl<const CAP: usize> SerWrite for ArrayVec<[u8; CAP]>
Available on crate feature
tinyvec
only.