Struct object::read::Bytes [−][src]
Expand description
A newtype for byte slices.
It has these important features:
- no methods that can panic, such as
Index - convenience methods for
Podtypes - a useful
Debugimplementation
Tuple Fields
0: &'data [u8]Implementations
Skip over the given number of bytes at the start of the byte slice.
Modifies the byte slice to start after the bytes.
Returns an error if there are too few bytes.
Return a reference to the given number of bytes at the start of the byte slice.
Modifies the byte slice to start after the bytes.
Returns an error if there are too few bytes.
Return a reference to the given number of bytes at the given offset of the byte slice.
Returns an error if the offset is invalid or there are too few bytes.
Return a reference to a Pod struct at the start of the byte slice.
Modifies the byte slice to start after the bytes.
Returns an error if there are too few bytes or the slice is incorrectly aligned.
Return a reference to a Pod struct at the given offset of the byte slice.
Returns an error if there are too few bytes or the offset is incorrectly aligned.
Return a reference to a slice of Pod structs at the start of the byte slice.
Modifies the byte slice to start after the bytes.
Returns an error if there are too few bytes or the offset is incorrectly aligned.
Return a reference to a slice of Pod structs at the given offset of the byte slice.
Returns an error if there are too few bytes or the offset is incorrectly aligned.
Read a null terminated string.
Does not assume any encoding. Reads past the null byte, but doesn’t return it.
Trait Implementations
Auto Trait Implementations
impl<'data> RefUnwindSafe for Bytes<'data>
impl<'data> UnwindSafe for Bytes<'data>
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.