Struct repr_offset::for_examples::ReprCNoGFO

source ·
#[repr(C)]
pub struct ReprCNoGFO<A = (), B = (), C = (), D = ()> { pub a: A, pub b: B, pub c: C, pub d: D, }
Expand description

An example #[repr(C)] type which doesn’t implement GetFieldOffset

Fields§

§a: A§b: B§c: C§d: D

Implementations§

source§

impl<A, B, C, D> ReprCNoGFO<A, B, C, D>

source

pub const OFFSET_A: FieldOffset<Self, A, Aligned> = _

The offset of the a field

source

pub const OFFSET_B: FieldOffset<Self, B, Aligned> = _

The offset of the b field

source

pub const OFFSET_C: FieldOffset<Self, C, Aligned> = _

The offset of the c field

source

pub const OFFSET_D: FieldOffset<Self, D, Aligned> = _

The offset of the d field

Trait Implementations§

source§

impl<A, B, C, D> Clone for ReprCNoGFO<A, B, C, D>
where A: Copy, B: Copy, C: Copy, D: Copy,

source§

fn clone(&self) -> Self

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
source§

impl<A: Default, B: Default, C: Default, D: Default> Default for ReprCNoGFO<A, B, C, D>

source§

fn default() -> ReprCNoGFO<A, B, C, D>

Returns the “default value” for a type. Read more
source§

impl<A, B, C, D> Copy for ReprCNoGFO<A, B, C, D>
where A: Copy, B: Copy, C: Copy, D: Copy,

Auto Trait Implementations§

§

impl<A, B, C, D> Freeze for ReprCNoGFO<A, B, C, D>
where A: Freeze, B: Freeze, C: Freeze, D: Freeze,

§

impl<A, B, C, D> RefUnwindSafe for ReprCNoGFO<A, B, C, D>

§

impl<A, B, C, D> Send for ReprCNoGFO<A, B, C, D>
where A: Send, B: Send, C: Send, D: Send,

§

impl<A, B, C, D> Sync for ReprCNoGFO<A, B, C, D>
where A: Sync, B: Sync, C: Sync, D: Sync,

§

impl<A, B, C, D> Unpin for ReprCNoGFO<A, B, C, D>
where A: Unpin, B: Unpin, C: Unpin, D: Unpin,

§

impl<A, B, C, D> UnwindSafe for ReprCNoGFO<A, B, C, D>

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<S> ROExtAcc for S

source§

fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F

Gets a reference to a field, determined by offset. Read more
source§

fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F

Gets a muatble reference to a field, determined by offset. Read more
source§

fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F

Gets a const pointer to a field, the field is determined by offset. Read more
source§

fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F

Gets a mutable pointer to a field, determined by offset. Read more
source§

impl<S> ROExtOps<Aligned> for S

source§

fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F

Replaces a field (determined by offset) with value, returning the previous value of the field. Read more
source§

fn f_swap<F>(&mut self, offset: FieldOffset<S, F, Aligned>, right: &mut S)

Swaps a field (determined by offset) with the same field in right. Read more
source§

fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> F
where F: Copy,

Gets a copy of a field (determined by offset). The field is determined by offset. Read more
source§

impl<S> ROExtOps<Unaligned> for S

source§

fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F

Replaces a field (determined by offset) with value, returning the previous value of the field. Read more
source§

fn f_swap<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, right: &mut S)

Swaps a field (determined by offset) with the same field in right. Read more
source§

fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> F
where F: Copy,

Gets a copy of a field (determined by offset). The field is determined by offset. 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.