Struct bytecodec::bincode_codec::BincodeEncoder [−][src]
pub struct BincodeEncoder<T: Serialize>(_);
JSON encoder.
Note that this encodes items monolithically so very large items may impair real-time property of the system.
Methods
impl<T> BincodeEncoder<T> where
T: Serialize,
[src]
impl<T> BincodeEncoder<T> where
T: Serialize,
Trait Implementations
impl<T: Debug + Serialize> Debug for BincodeEncoder<T>
[src]
impl<T: Debug + Serialize> Debug for BincodeEncoder<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> Encode for BincodeEncoder<T> where
T: Serialize,
[src]
impl<T> Encode for BincodeEncoder<T> where
T: Serialize,
type Item = T
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
[src]
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>
Encodes the items in the encoder and writes the encoded bytes to the given buffer. Read more
fn start_encoding(&mut self, item: Self::Item) -> Result<()>
[src]
fn start_encoding(&mut self, item: Self::Item) -> Result<()>
Tries to start encoding the given item. Read more
fn is_idle(&self) -> bool
[src]
fn is_idle(&self) -> bool
Returns true
if there are no items to be encoded in the encoder, otherwise false
. Read more
fn requiring_bytes(&self) -> ByteCount
[src]
fn requiring_bytes(&self) -> ByteCount
Returns the number of bytes required to encode all the items in the encoder. Read more
impl<T> Default for BincodeEncoder<T> where
T: Serialize,
[src]
impl<T> Default for BincodeEncoder<T> where
T: Serialize,
Auto Trait Implementations
impl<T> Send for BincodeEncoder<T> where
T: Send,
impl<T> Send for BincodeEncoder<T> where
T: Send,
impl<T> Sync for BincodeEncoder<T> where
T: Sync,
impl<T> Sync for BincodeEncoder<T> where
T: Sync,