Struct extendr_api::prelude::utils::slice::RefGroupMut

pub struct RefGroupMut<'a, E, T = <E as Entity>::Unit>(<<E as Entity>::Group as ForType>::FaerOf<*mut T>, PhantomData<&'a mut ()>)
where
    E: Entity,
    T: 'a;
Expand description

Wrapper around a group of mutable references.

Tuple Fields§

§0: <<E as Entity>::Group as ForType>::FaerOf<*mut T>§1: PhantomData<&'a mut ()>

Implementations§

§

impl<'a, E, T, const N: usize> RefGroupMut<'a, E, [T; N]>
where E: Entity,

pub fn unzip(self) -> [RefGroupMut<'a, E, T>; N]

Convert a mutable reference to an array to an array of mutable references.

§

impl<'a, E, T> RefGroupMut<'a, E, T>
where E: Entity,

pub fn new( reference: <<E as Entity>::Group as ForType>::FaerOf<&'a mut T>, ) -> RefGroupMut<'a, E, T>

Create a new RefGroupMut from a group of mutable references.

pub fn into_inner(self) -> <<E as Entity>::Group as ForType>::FaerOf<&'a mut T>

Consume self to return the internally stored group of references.

pub fn get(&self) -> <<E as Entity>::Group as ForCopyType>::FaerOfCopy<T>
where T: Copy,

Copies and returns the value pointed to by the references.

pub fn set( &mut self, value: <<E as Entity>::Group as ForCopyType>::FaerOfCopy<T>, )
where T: Copy,

Writes value to the location pointed to by the references.

pub fn set_(&mut self, value: <<E as Entity>::Group as ForType>::FaerOf<T>)

Writes value to the location pointed to by the references.

§

impl<'a, E> RefGroupMut<'a, E>
where E: Entity,

pub fn read(&self) -> E

Read the element pointed to by the references.

pub fn write(&mut self, value: E)

Write value to the location pointed to by the references.

Trait Implementations§

§

impl<E, T> Debug for RefGroupMut<'_, E, T>
where E: Entity, T: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<'a, E, T> IntoConst for RefGroupMut<'a, E, T>
where E: Entity,

§

type Target = RefGroup<'a, E, T>

§

fn into_const(self) -> <RefGroupMut<'a, E, T> as IntoConst>::Target

§

impl<E, T> Read for RefGroupMut<'_, E, T>
where E: Entity, T: Copy + Debug,

§

type Output = <<E as Entity>::Group as ForCopyType>::FaerOfCopy<T>

§

fn read_or( &self, _or: <RefGroupMut<'_, E, T> as Read>::Output, ) -> <RefGroupMut<'_, E, T> as Read>::Output

§

impl<'short, 'a, E, T> Reborrow<'short> for RefGroupMut<'a, E, T>
where E: Entity,

§

type Target = RefGroup<'short, E, T>

§

fn rb(&'short self) -> <RefGroupMut<'a, E, T> as Reborrow<'short>>::Target

§

impl<'short, 'a, E, T> ReborrowMut<'short> for RefGroupMut<'a, E, T>
where E: Entity,

§

type Target = RefGroupMut<'short, E, T>

§

fn rb_mut( &'short mut self, ) -> <RefGroupMut<'a, E, T> as ReborrowMut<'short>>::Target

§

impl<E, T> Write for RefGroupMut<'_, E, T>
where E: Entity, T: Copy + Debug,

§

fn write(&mut self, values: <RefGroupMut<'_, E, T> as Read>::Output)

Auto Trait Implementations§

§

impl<'a, E, T> Freeze for RefGroupMut<'a, E, T>
where <<E as Entity>::Group as ForType>::FaerOf<*mut T>: Freeze,

§

impl<'a, E, T> RefUnwindSafe for RefGroupMut<'a, E, T>
where <<E as Entity>::Group as ForType>::FaerOf<*mut T>: RefUnwindSafe,

§

impl<'a, E, T> Send for RefGroupMut<'a, E, T>
where <<E as Entity>::Group as ForType>::FaerOf<*mut T>: Send,

§

impl<'a, E, T> Sync for RefGroupMut<'a, E, T>
where <<E as Entity>::Group as ForType>::FaerOf<*mut T>: Sync,

§

impl<'a, E, T> Unpin for RefGroupMut<'a, E, T>
where <<E as Entity>::Group as ForType>::FaerOf<*mut T>: Unpin,

§

impl<'a, E, T = <E as Entity>::Unit> !UnwindSafe for RefGroupMut<'a, E, T>

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> 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.
§

impl<T> UniversalReborrow for T
where T: for<'a> Reborrow<'a>,

§

impl<T> UniversalReborrowMut for T
where T: for<'a> ReborrowMut<'a>,