Struct bytecodec::fixnum::I64leEncoder [−][src]
pub struct I64leEncoder(_);
Expand description
Encoder which encodes i64
values by little-endian byte order.
Examples
use bytecodec::EncodeExt; use bytecodec::fixnum::I64leEncoder; use bytecodec::io::IoEncodeExt; let mut output = Vec::new(); let mut encoder = I64leEncoder::with_item(-2).unwrap(); encoder.encode_all(&mut output).unwrap(); assert_eq!(output, [0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]);
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
Returns the exact number of bytes required to encode all the items remaining in the encoder.
Auto Trait Implementations
impl RefUnwindSafe for I64leEncoder
impl Send for I64leEncoder
impl Sync for I64leEncoder
impl Unpin for I64leEncoder
impl UnwindSafe for I64leEncoder
Blanket Implementations
Mutably borrows from an owned value. Read more
Encodes the items remaining in the encoder and writes the encoded bytes to the given write buffer. Read more
Encodes the items remaining in the encoder and
writes the encoded bytes to the given write buffer.
If the write buffer is full and the writing cannot be performed,
the given WriteBuf will memorize cx’s Waker
.
This Waker
’s wake
will later be called when the WriteBuf
regains its free space. Read more