Module rmp::decode [−][src]
Expand description
Provides various functions and structs for MessagePack decoding.
Most of the function defined in this module will silently handle interruption error (EINTR)
received from the given Read
to be in consistent state with the Write::write_all
method in
the standard library.
Any other error would immediately interrupt the parsing process. If your reader can results in
I/O error and simultaneously be a recoverable state (for example, when reading from
non-blocking socket and it returns EWOULDBLOCK) be sure that you buffer the data externally
to avoid data loss (using BufRead
readers with manual consuming or some other way).
Re-exports
pub use bytes::Bytes;
Modules
Structs
Extension type meta information.
An error that can occur when attempting to read a MessagePack marker from the reader.
Enums
An error which can occur when attempting to read a MessagePack numeric value from the reader.
An error which can occur when attempting to read a MessagePack value from the reader.
Traits
A type that rmp
supports reading from.
The error type for I/O operations on RmpRead
and associated traits.
Functions
Attempts to read up to 5 bytes from the given reader and to decode them as a big-endian u32 array size.
Attempts to read up to 5 bytes from the given reader and to decode them as Binary array length.
Attempts to read a single byte from the given reader and to decode it as a boolean value.
Attempts to read exactly 5 bytes from the given reader and to decode them as f32
value.
Attempts to read exactly 9 bytes from the given reader and to decode them as f64
value.
Attempts to read exactly 3 bytes from the given reader and interpret them as a fixext1 type with data attached.
Attempts to read exactly 4 bytes from the given reader and interpret them as a fixext2 type with data attached.
Attempts to read exactly 6 bytes from the given reader and interpret them as a fixext4 type with data attached.
Attempts to read exactly 10 bytes from the given reader and interpret them as a fixext8 type with data attached.
Attempts to read exactly 18 bytes from the given reader and interpret them as a fixext16 type with data attached.
Attempts to read exactly 2 bytes from the given reader and to decode them as i8
value.
Attempts to read exactly 3 bytes from the given reader and to decode them as i16
value.
Attempts to read exactly 5 bytes from the given reader and to decode them as i32
value.
Attempts to read exactly 9 bytes from the given reader and to decode them as i64
value.
Attempts to read up to 9 bytes from the given reader and to decode them as integral T
value.
Attempts to read up to 5 bytes from the given reader and to decode them as a big-endian u32 map size.
Attempts to read a single byte from the given reader and to decode it as a MessagePack marker.
Attempts to read a single byte from the given reader and to decode it as a negative fixnum value.
Attempts to read a single byte from the given reader and to decode it as a nil value.
Attempts to read a single byte from the given reader and to decode it as a positive fixnum value.
Attempts to read a string data from the given reader and copy it to the buffer provided.
Attempts to read and decode a string value from the reader, returning a borrowed slice from it.
Attempts to read up to 9 bytes from the given reader and to decode them as a string u32
size
value.
Attempts to read and decode a string value from the reader, returning a borrowed slice from it.
Attempts to read exactly 2 bytes from the given reader and to decode them as u8
value.
Attempts to read exactly 3 bytes from the given reader and to decode them as u16
value.
Attempts to read exactly 5 bytes from the given reader and to decode them as u32
value.
Attempts to read exactly 9 bytes from the given reader and to decode them as u64
value.
Type Definitions
An alias to the “default” error handling type.