[][src]Struct abi_stable::type_layout::CompTLField

#[repr(transparent)]pub struct CompTLField { /* fields omitted */ }

A TLField represented as a u64, expadable to a TLField by calling the expand method.

Implementations

impl CompTLField[src]

pub const BIT_SIZE: u32[src]

The amount of bits necessary to represent a CompTLField.

pub const fn new(
    name: StartLen,
    lifetime_indices: LifetimeRange,
    field_accessor: CompFieldAccessor,
    layout: TypeLayoutIndex,
    is_function: bool
) -> Self
[src]

Constructs a CompTLField.

pub fn name_start_len(&self) -> StartLen[src]

Gets the range representing the name in the string slice field inside the SharedVars field of the TypeLayout that contains this.

pub fn type_layout_index(&self) -> usize[src]

Gets the index of the type layout of the field in the TypeLayoutCtor slice inside the SharedVars field of the TypeLayout that contains this.

pub fn is_function(&self) -> bool[src]

Whether this field is a function. This is only true if the type is a function pointer(not inside some other type).

impl CompTLField[src]

pub fn name(&self, strings: &'static str) -> &'static str[src]

Gets the name of the field from SharedVars's string slice.

pub fn lifetime_indices(
    &self,
    indices: &'static [LifetimeIndexPair]
) -> LifetimeArrayOrSlice<'static>
[src]

Gets the name of the field from SharedVars's slice of lifetime indices.

pub fn field_accessor(&self, strings: &'static str) -> FieldAccessor[src]

Gets the FieldAccessor for the type from SharedVars's string slice, which describes whether a field is accessible,and how it is accessed..

pub fn type_layout(
    &self,
    type_layouts: &'static [TypeLayoutCtor]
) -> TypeLayoutCtor
[src]

Gets the name of the field from SharedVars's slice of TypeLayoutCtor.

pub fn expand(
    &self,
    field_index: usize,
    functions: Option<&'static TLFunctions>,
    vars: &'static SharedVars
) -> TLField
[src]

Expands this CompTLField into a TLField.

Trait Implementations

impl Clone for CompTLField[src]

impl Copy for CompTLField[src]

impl Debug for CompTLField[src]

impl GetStaticEquivalent_ for CompTLField[src]

type StaticEquivalent = _static_CompTLField

impl StableAbi for CompTLField[src]

type IsNonZeroType = <u64 as __StableAbi>::IsNonZeroType

Whether this type has a single invalid bit-pattern. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> BorrowOwned<'a> for T where
    T: 'a + Clone
[src]

type ROwned = T

The owned type, stored in RCow::Owned

type RBorrowed = &'a T

The borrowed type, stored in RCow::Borrowed

impl<T> From<T> for T[src]

impl<T> GetWithMetadata for T[src]

type ForSelf = WithMetadata_<T, T>

This is always WithMetadata_<Self, Self>

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SelfOps for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<This> TransmuteElement for This where
    This: ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The error type returned when the conversion fails.

impl<T> TypeIdentity for T where
    T: ?Sized
[src]

type Type = T

The same type as Self. Read more