Struct zordon::types::ArrayView[][src]

pub struct ArrayView<'a, T> { /* fields omitted */ }
Expand description

A mutable array view for type [u8; L] where L is a const.

Implementations

impl<'a, T> ArrayView<'a, T>[src]

pub fn mut_view(arr: &'a mut [u8]) -> (Self, &'a mut [u8])[src]

Returns an ArrayView and leftover slice.

impl<'a, const L: usize> ArrayView<'a, [u8; L]>[src]

pub fn as_mut_ref(&self) -> RefMut<'_, &'a mut [u8]>[src]

Returns a mutable reference to the array.

pub fn as_ref(&self) -> Ref<'_, &'a mut [u8]>[src]

Returns a reference to the array.

pub fn rc_clone(&self) -> Rc<RefCell<&'a mut [u8]>>[src]

Retruns a clone of the reference counted pointer.

pub fn set(&mut self, src: &[u8])[src]

Copies bytes from a &[u8] source to the underlying array.

Trait Implementations

impl<'a, T: Debug> Debug for ArrayView<'a, T>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'a, T: PartialEq> PartialEq<ArrayView<'a, T>> for ArrayView<'a, T>[src]

fn eq(&self, other: &ArrayView<'a, T>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &ArrayView<'a, T>) -> bool[src]

This method tests for !=.

impl<'a, T> StructuralPartialEq for ArrayView<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for ArrayView<'a, T>

impl<'a, T> !Send for ArrayView<'a, T>

impl<'a, T> !Sync for ArrayView<'a, T>

impl<'a, T> Unpin for ArrayView<'a, T> where
    T: Unpin

impl<'a, T> !UnwindSafe for ArrayView<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.