Struct bytecodec::json_codec::JsonEncoder  
                   
                       [−]
                   
               [src]
pub struct JsonEncoder<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> JsonEncoder<T> where
    T: Serialize, [src]
            T: Serialize,
Trait Implementations
impl<T: Debug + Serialize> Debug for JsonEncoder<T>[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl<T> Encode for JsonEncoder<T> where
    T: Serialize, [src]
T: Serialize,
type Item = T
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>[src]
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]
Tries to start encoding the given item. Read more
fn is_idle(&self) -> bool[src]
Returns true if there are no items to be encoded in the encoder, otherwise false.
fn requiring_bytes(&self) -> ByteCount[src]
Returns the number of bytes required to encode all the items in the encoder. Read more
impl<T> Default for JsonEncoder<T> where
    T: Serialize, [src]
T: Serialize,
Auto Trait Implementations
impl<T> Send for JsonEncoder<T> where
    T: Send, 
T: Send,
impl<T> Sync for JsonEncoder<T> where
    T: Sync, 
T: Sync,