pub struct VariableByteIntegerDecoder;
Expand description
Variable byte integer decoder structure is help structure which implements function used to decode message lenghts in MQTT packet and other parts encoded into variable byte integer.
Implementations§
Source§impl VariableByteIntegerDecoder
impl VariableByteIntegerDecoder
Sourcepub fn decode(encoded: VariableByteInteger) -> Result<u32, BufferError>
pub fn decode(encoded: VariableByteInteger) -> Result<u32, BufferError>
Decode function takes as paramater encoded integer represented as array of 4 unsigned numbers of exactly 1 Byte each -> 4 Bytes maximal same as maximal amount of bytes for variable byte encoding in MQTT.
Auto Trait Implementations§
impl Freeze for VariableByteIntegerDecoder
impl RefUnwindSafe for VariableByteIntegerDecoder
impl Send for VariableByteIntegerDecoder
impl Sync for VariableByteIntegerDecoder
impl Unpin for VariableByteIntegerDecoder
impl UnwindSafe for VariableByteIntegerDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more