Struct bytecodec::fixnum::F32beEncoder [−][src]
pub struct F32beEncoder(_);
Expand description
Encoder which encodes f32
values by big-endian byte order.
Examples
use bytecodec::EncodeExt; use bytecodec::fixnum::F32beEncoder; use bytecodec::io::IoEncodeExt; let mut output = Vec::new(); let mut encoder = F32beEncoder::with_item(123.4).unwrap(); encoder.encode_all(&mut output).unwrap(); assert_eq!(output, [66, 246, 204, 205]);
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 F32beEncoder
impl Send for F32beEncoder
impl Sync for F32beEncoder
impl Unpin for F32beEncoder
impl UnwindSafe for F32beEncoder
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