Struct extendr_api::prelude::utils::slice::RefGroup

pub struct RefGroup<'a, E, T = <E as Entity>::Unit>(<<E as Entity>::Group as ForCopyType>::FaerOfCopy<*const T>, PhantomData<&'a ()>)
where
    E: Entity,
    T: 'a;
Expand description

Wrapper around a group of references.

Tuple Fields§

§0: <<E as Entity>::Group as ForCopyType>::FaerOfCopy<*const T>§1: PhantomData<&'a ()>

Implementations§

§

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

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

Create a new RefGroup from a group of references.

pub fn into_inner(self) -> <<E as Entity>::Group as ForType>::FaerOf<&'a 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.

§

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

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

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

§

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

pub fn read(&self) -> E

Read the element pointed to by the references.

Trait Implementations§

§

impl<E, T> Clone for RefGroup<'_, E, T>
where E: Entity,

§

fn clone(&self) -> RefGroup<'_, E, T>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
§

impl<E, T> Debug for RefGroup<'_, 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 RefGroup<'a, E, T>
where E: Entity,

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

impl<E, T> Copy for RefGroup<'_, E, T>
where E: Entity,

Auto Trait Implementations§

§

impl<'a, E, T> Freeze for RefGroup<'a, E, T>
where <<E as Entity>::Group as ForCopyType>::FaerOfCopy<*const T>: Freeze,

§

impl<'a, E, T> RefUnwindSafe for RefGroup<'a, E, T>
where <<E as Entity>::Group as ForCopyType>::FaerOfCopy<*const T>: RefUnwindSafe,

§

impl<'a, E, T> Send for RefGroup<'a, E, T>
where <<E as Entity>::Group as ForCopyType>::FaerOfCopy<*const T>: Send,

§

impl<'a, E, T> Sync for RefGroup<'a, E, T>
where <<E as Entity>::Group as ForCopyType>::FaerOfCopy<*const T>: Sync,

§

impl<'a, E, T> Unpin for RefGroup<'a, E, T>
where <<E as Entity>::Group as ForCopyType>::FaerOfCopy<*const T>: Unpin,

§

impl<'a, E, T> UnwindSafe for RefGroup<'a, E, T>
where <<E as Entity>::Group as ForCopyType>::FaerOfCopy<*const T>: UnwindSafe,

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> 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.
§

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

§

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