[−][src]Enum parity_bytes::BytesRef
A byte collection reference that can either be a slice or a vector
Variants
Flexible(&'a mut Bytes)
This is a reference to a vector
This is a reference to a slice
Methods
impl<'a> BytesRef<'a>
[src]
pub fn write(&mut self, offset: usize, input: &[u8]) -> usize
[src]
Writes given input
to this BytesRef
starting at offset
.
Returns number of bytes written to the ref.
NOTE can return number greater then input.len()
in case flexible vector had to be extended.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for BytesRef<'a>
impl<'a> Send for BytesRef<'a>
impl<'a> Sync for BytesRef<'a>
impl<'a> Unpin for BytesRef<'a>
impl<'a> !UnwindSafe for BytesRef<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,