Struct Mut

Source
pub struct Mut { /* private fields */ }

Implementations§

Source§

impl Mut

Source

pub unsafe fn new(ptr: *mut u8, len: usize) -> Self

Source

pub unsafe fn from_slice(slice: &mut [u8]) -> Self

Source

pub unsafe fn cast_to_ref<'a, T>(self) -> &'a mut T

Source

pub fn slice<'a>(self) -> &'a mut [u8]

Source

pub unsafe fn array<'a, const L: usize>(self) -> &'a mut [u8; L]

Source

pub fn fill(self, value: u8)

Source

pub fn fill_with(self, value: impl FnMut() -> u8)

Source

pub fn copy_within<R: RangeBounds<usize>>(self, src: R, dest: usize)

Source

pub fn copy_from(self, src: Const)

Source

pub fn copy_from_slice(self, slice: &[u8])

Source

pub fn swap(self, with: Mut)

Trait Implementations§

Source§

impl Clone for Mut

Source§

fn clone(&self) -> Mut

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> From<Mut> for &'a [u8]

Source§

fn from(value: Mut) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Mut> for &'a mut [u8]

Source§

fn from(value: Mut) -> Self

Converts to this type from the input type.
Source§

impl Index<usize> for Mut

Source§

type Output = u8

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Mut

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl Instance for Mut

Source§

unsafe fn range_at(self, at: usize, len: usize) -> Self

Source§

unsafe fn range(self, start: usize, end: usize) -> Self

Source§

unsafe fn range_from(self, start: usize) -> Self

Source§

fn to_const(self) -> Const

Source§

fn len(self) -> usize

Source§

impl Instance for Mut

Source§

type Buf<P: Ptr> = BytesPtrMutBuf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for Mut

Source§

fn len(&self) -> usize

Source§

fn buf_len(buf: BufConst<Self>) -> usize

Source§

fn encode(&self, buf: BufMut<Self>) -> usize

Source§

impl<P: Ptr> Readable<Mut> for BytesPtrMutBuf<P>

Source§

fn write_to(self, buf: BufMut<Mut>) -> usize

Source§

fn len(&self) -> usize

Source§

impl Copy for Mut

Auto Trait Implementations§

§

impl Freeze for Mut

§

impl RefUnwindSafe for Mut

§

impl !Send for Mut

§

impl !Sync for Mut

§

impl Unpin for Mut

§

impl UnwindSafe for Mut

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.