pub struct LateFieldDescriptor<S: LateStruct> { /* private fields */ }Expand description
A typed descriptor for a LateField.
You can obtain a reference to this descriptor using LateField::descriptor.
Unlike LateFieldDescriptor, this descriptor encodes the type of the LateStruct to which
the field belongs.
Implementations§
Source§impl<S: LateStruct> LateFieldDescriptor<S>
impl<S: LateStruct> LateFieldDescriptor<S>
Sourcepub const fn raw(&self) -> &RawLateFieldDescriptor
pub const fn raw(&self) -> &RawLateFieldDescriptor
Erases the type information from this descriptor, producing its equivalent
RawLateFieldDescriptor.
Source§impl<S: LateStruct> LateFieldDescriptor<S>
impl<S: LateStruct> LateFieldDescriptor<S>
Sourcepub fn index(&self, token: LateLayoutInitToken) -> usize
pub fn index(&self, token: LateLayoutInitToken) -> usize
Forwards to RawLateFieldDescriptor::index.
Sourcepub fn offset(&self, token: LateLayoutInitToken) -> usize
pub fn offset(&self, token: LateLayoutInitToken) -> usize
Forwards to RawLateFieldDescriptor::offset.
Sourcepub fn layout(&self) -> Layout
pub fn layout(&self) -> Layout
Forwards to RawLateFieldDescriptor::layout.
Sourcepub fn erase_value(&self, value: *mut u8) -> *mut S::EraseTo
pub fn erase_value(&self, value: *mut u8) -> *mut S::EraseTo
Forwards to RawLateFieldDescriptor::erase_value but uses type information to make the
operation safe.
Sourcepub fn key_type_name(&self) -> &'static str
pub fn key_type_name(&self) -> &'static str
Forwards to RawLateFieldDescriptor::key_type_name.
Sourcepub fn key_type_id(&self) -> TypeId
pub fn key_type_id(&self) -> TypeId
Forwards to RawLateFieldDescriptor::key_type_id.
Sourcepub fn parent_struct(&self) -> &'static LateStructDescriptor<S>
pub fn parent_struct(&self) -> &'static LateStructDescriptor<S>
Forwards to RawLateFieldDescriptor::parent_struct but preserves the type annotation.
Trait Implementations§
Auto Trait Implementations§
impl<S> !Freeze for LateFieldDescriptor<S>
impl<S> RefUnwindSafe for LateFieldDescriptor<S>
impl<S> Send for LateFieldDescriptor<S>
impl<S> Sync for LateFieldDescriptor<S>
impl<S> Unpin for LateFieldDescriptor<S>
impl<S> UnwindSafe for LateFieldDescriptor<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more