Trait Projectable

Source
pub trait Projectable<T, F: Field<T>> {
    type Target;

    // Required method
    unsafe fn project(self) -> Self::Target;
}
Expand description

Trait for a wrapper type that can be projected to a field.

F is a descriptor of a field (FieldName with some generic parameters).

Required Associated Types§

Source

type Target

Type of the wrapped projected field.

Required Methods§

Source

unsafe fn project(self) -> Self::Target

Project the field.

§Safety

The function must be called only if F is accessible with Rust privacy rules by the caller.

Implementations on Foreign Types§

Source§

impl<'a, T, F> Projectable<T, F> for &'a MaybeUninit<T>
where F: Field<T>, F::Type: Sized + 'a,

Source§

type Target = &'a MaybeUninit<<F as Field<T>>::Type>

Source§

unsafe fn project(self) -> Self::Target

Source§

impl<'a, T, F> Projectable<T, F> for &'a mut MaybeUninit<T>
where F: Field<T>, F::Type: Sized + 'a,

Source§

type Target = &'a mut MaybeUninit<<F as Field<T>>::Type>

Source§

unsafe fn project(self) -> Self::Target

Source§

impl<'a, T, F> Projectable<T, F> for Pin<&'a mut T>
where F: PinField<T>, F::Type: 'a,

Source§

type Target = <F as PinField<T>>::PinWrapper<'a, <F as Field<T>>::Type>

Source§

unsafe fn project(self) -> Self::Target

Implementors§