Struct simple_bytes::Bytes
source · [−]pub struct Bytes<'a> { /* private fields */ }
Expand description
A slice wrapper that implements BytesRead.
Implementations
You should probably use:
let bytes: Bytes = slice.into();
// or
let bytes = Bytes::from(slice);
Trait Implementations
Returns the entire slice.
Returns all remaining bytes.
Reads a given length of bytes. Read more
Tries to read a given length without updating
the internal position. Returns None
if there are not enought
bytes remaining. Read more
Reads
2
bytes in big-endian converting them into an u16
. Read more
Reads
4
bytes in big-endian converting them into an u32
. Read more
Reads
8
bytes in big-endian converting them into an u64
. Read more
Reads
16
bytes in big-endian converting them into an u128
. Read more
Reads
2
bytes in big-endian converting them into an i16
. Read more
Reads
4
bytes in big-endian converting them into an i32
. Read more
Reads
8
bytes in big-endian converting them into an i64
. Read more
Reads
16
bytes in big-endian converting them into an i128
. Read more
Reads
4
bytes in big-endian converting them into an f32
. Read more
Reads
8
bytes in big-endian converting them into an f64
. Read more
Reads
1
bytes in little-endian converting them into an u8
. Read more
Reads
2
bytes in little-endian converting them into an u16
. Read more
Reads
4
bytes in little-endian converting them into an u32
. Read more
Reads
8
bytes in little-endian converting them into an u64
. Read more
Reads
16
bytes in little-endian converting them into an u128
. Read more
Reads
1
bytes in little-endian converting them into an i8
. Read more
Reads
2
bytes in little-endian converting them into an i16
. Read more
Reads
4
bytes in little-endian converting them into an i32
. Read more
Reads
8
bytes in little-endian converting them into an i64
. Read more
Reads
16
bytes in little-endian converting them into an i128
. Read more
Reads
4
bytes in little-endian converting them into an f32
. Read more
Reads
8
bytes in little-endian converting them into an f64
. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for Bytes<'a>
impl<'a> UnwindSafe for Bytes<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more