pub struct BytesOwned { /* fields omitted */ }
Expand description
A Vec wrapper that implements BytesWrite and BytesRead
Creates a new Vec with the given capacity.
Creates a BytesOwned struct.
Returns the underlying Vec mutably.
Removing items can lead to panics while
reading or writing.
Returns the underlying Vec.
Returns the entire slice.
Returns the length of the entire slice.
Returns all remaining bytes.
Tries to read a given length without updating
the internal position. Returns None
if there are not enought
bytes remaining. Read more
Reads
1
bytes converting them into an u8
. Read more
Reads
2
bytes converting them into an u16
. Read more
Reads
4
bytes converting them into an u32
. Read more
Reads
8
bytes converting them into an u64
. Read more
Reads
16
bytes converting them into an u128
. Read more
Reads
1
bytes converting them into an i8
. Read more
Reads
2
bytes converting them into an i16
. Read more
Reads
4
bytes converting them into an i32
. Read more
Reads
8
bytes converting them into an i64
. Read more
Reads
16
bytes converting them into an i128
. Read more
Reads
4
bytes converting them into an f32
. Read more
Reads
8
bytes converting them into an f64
. Read more
Returns the internal position.
Sets the internal position, allocating more space
if the position is bigger than the Vec
.
Returns the remaining mutable slice.
If an empty slice is returned, this does not mean
you can’t write anymore.
Writes a slice. Allocates more space if the slice is
bigger than the Vec
.
Returns the entire slice mutably.
Returns the entire slice as a bytes struct
setting the position of the new Bytes to 0
. Read more
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.