Struct abi_stable::type_layout::MonoTypeLayout
source · #[repr(C)]pub struct MonoTypeLayout { /* private fields */ }
Expand description
The data in the type layout that does not depend on generic parameters.
Implementations
sourceimpl MonoTypeLayout
impl MonoTypeLayout
sourcepub const fn mod_refl_mode(&self) -> ModReflMode
pub const fn mod_refl_mode(&self) -> ModReflMode
Gets the ModReflMode
for the type,
whether this is a module whose definition can be reflected on at runtime.
Gets the SharedVars of the type, containing the slices that many types inside TypeLayout contain ranges into.
Gets the SharedVars of the type, containing the slices that many types inside TypeLayout contain ranges into.
This was defined as a workaround for an internal compiler error in nightly.
sourcepub fn get_fields(&self) -> Option<CompTLFields>
pub fn get_fields(&self) -> Option<CompTLFields>
Gets the compressed versions of the fields of the type.
Return value
If this a:
-
primitive or opaque type: It returns
None
. -
enum: It returns
Some()
with all the fields in the order that they were declared, ignoring variants. -
structs/unions/prefix types: It returns
Some()
with all the fields in the order that they were declared.
sourcepub fn field_names(
&self
) -> impl ExactSizeIterator<Item = &'static str> + Clone + 'static
pub fn field_names(
&self
) -> impl ExactSizeIterator<Item = &'static str> + Clone + 'static
Gets an iterator over all the names of the fields in the type.
sourcepub fn get_field_name(&self, nth: usize) -> Option<&'static str>
pub fn get_field_name(&self, nth: usize) -> Option<&'static str>
Gets the name of the nth
field in the type.
Returns None
if there is no nth
field.
Trait Implementations
sourceimpl Clone for MonoTypeLayout
impl Clone for MonoTypeLayout
sourcefn clone(&self) -> MonoTypeLayout
fn clone(&self) -> MonoTypeLayout
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for MonoTypeLayout
impl Debug for MonoTypeLayout
sourceimpl GetStaticEquivalent_ for MonoTypeLayout
impl GetStaticEquivalent_ for MonoTypeLayout
type StaticEquivalent = _static_MonoTypeLayout
sourceimpl StableAbi for MonoTypeLayout
impl StableAbi for MonoTypeLayout
type IsNonZeroType = False
type IsNonZeroType = False
sourceconst LAYOUT: &'static TypeLayout = _
const LAYOUT: &'static TypeLayout = _
sourceconst ABI_CONSTS: AbiConsts = _
const ABI_CONSTS: AbiConsts = _
const
-equivalents of the associated types.impl Copy for MonoTypeLayout
impl Send for MonoTypeLayout
impl Sync for MonoTypeLayout
Auto Trait Implementations
impl RefUnwindSafe for MonoTypeLayout
impl Unpin for MonoTypeLayout
impl UnwindSafe for MonoTypeLayout
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<'a, T> BorrowOwned<'a> for Twhere
T: 'a + Clone,
impl<'a, T> BorrowOwned<'a> for Twhere
T: 'a + Clone,
type ROwned = T
type ROwned = T
RCow::Owned
fn r_borrow(
this: &'a <T as BorrowOwned<'a>>::ROwned
) -> <T as BorrowOwned<'a>>::RBorrowed
fn r_to_owned(
this: <T as BorrowOwned<'a>>::RBorrowed
) -> <T as BorrowOwned<'a>>::ROwned
fn deref_borrowed(this: &<T as BorrowOwned<'a>>::RBorrowed) -> &T
fn deref_owned(this: &<T as BorrowOwned<'a>>::ROwned) -> &T
fn from_cow_borrow(this: &'a T) -> <T as BorrowOwned<'a>>::RBorrowed
fn from_cow_owned(this: <T as ToOwned>::Owned) -> <T as BorrowOwned<'a>>::ROwned
fn into_cow_borrow(this: <T as BorrowOwned<'a>>::RBorrowed) -> &'a T
fn into_cow_owned(this: <T as BorrowOwned<'a>>::ROwned) -> <T as ToOwned>::Owned
sourceimpl<T> GetWithMetadata for T
impl<T> GetWithMetadata for T
type ForSelf = WithMetadata_<T, T>
type ForSelf = WithMetadata_<T, T>
WithMetadata_<Self, Self>
sourceimpl<S> ROExtAcc for S
impl<S> ROExtAcc for S
sourcefn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
fn f_get<F>(&self, offset: FieldOffset<S, F, Aligned>) -> &F
offset
. Read moresourcefn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
fn f_get_mut<F>(&mut self, offset: FieldOffset<S, F, Aligned>) -> &mut F
offset
. Read moresourcefn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
fn f_get_ptr<F, A>(&self, offset: FieldOffset<S, F, A>) -> *const F
offset
. Read moresourcefn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
fn f_get_mut_ptr<F, A>(&mut self, offset: FieldOffset<S, F, A>) -> *mut F
offset
. Read moresourceimpl<S> ROExtOps<Aligned> for S
impl<S> ROExtOps<Aligned> for S
sourcefn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Aligned>, value: F) -> F
offset
) with value
,
returning the previous value of the field. Read moresourcefn f_swap<F>(&mut self, offset: FieldOffset<S, F, Aligned>, right: &mut S)
fn f_swap<F>(&mut self, offset: FieldOffset<S, F, Aligned>, right: &mut S)
sourcefn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Aligned>) -> Fwhere
F: Copy,
sourceimpl<S> ROExtOps<Unaligned> for S
impl<S> ROExtOps<Unaligned> for S
sourcefn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
fn f_replace<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, value: F) -> F
offset
) with value
,
returning the previous value of the field. Read moresourcefn f_swap<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, right: &mut S)
fn f_swap<F>(&mut self, offset: FieldOffset<S, F, Unaligned>, right: &mut S)
sourcefn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
fn f_get_copy<F>(&self, offset: FieldOffset<S, F, Unaligned>) -> Fwhere
F: Copy,
sourceimpl<T> SelfOps for Twhere
T: ?Sized,
impl<T> SelfOps for Twhere
T: ?Sized,
sourcefn piped<F, U>(self, f: F) -> Uwhere
F: FnOnce(Self) -> U,
Self: Sized,
fn piped<F, U>(self, f: F) -> Uwhere
F: FnOnce(Self) -> U,
Self: Sized,
sourcefn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
piped
except that the function takes &Self
Useful for functions that take &Self
instead of Self
. Read moresourcefn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
piped
, except that the function takes &mut Self
.
Useful for functions that take &mut Self
instead of Self
. Read moresourcefn mutated<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut Self),
Self: Sized,
fn mutated<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut Self),
Self: Sized,
sourcefn observe<F>(self, f: F) -> Selfwhere
F: FnOnce(&Self),
Self: Sized,
fn observe<F>(self, f: F) -> Selfwhere
F: FnOnce(&Self),
Self: Sized,
sourcefn as_ref_<T>(&self) -> &Twhere
Self: AsRef<T>,
T: ?Sized,
fn as_ref_<T>(&self) -> &Twhere
Self: AsRef<T>,
T: ?Sized,
AsRef
,
using the turbofish .as_ref_::<_>()
syntax. Read moresourceimpl<This> TransmuteElement for Thiswhere
This: ?Sized,
impl<This> TransmuteElement for Thiswhere
This: ?Sized,
sourceunsafe fn transmute_element<T>(
self
) -> <Self as CanTransmuteElement<T>>::TransmutedPtrwhere
Self: CanTransmuteElement<T>,
unsafe fn transmute_element<T>(
self
) -> <Self as CanTransmuteElement<T>>::TransmutedPtrwhere
Self: CanTransmuteElement<T>,
sourceimpl<T> TypeIdentity for Twhere
T: ?Sized,
impl<T> TypeIdentity for Twhere
T: ?Sized,
type Type = T
type Type = T
Self
.