pub struct FieldId { /* private fields */ }๐ฌThis is a nightly-only experimental API. (
type_info)Expand description
Field representing type ID. Representing a field of a struct, tuple or enum variant.
Implementationsยง
Sourceยงimpl FieldId
impl FieldId
Sourcepub const fn type_id(self) -> TypeId
๐ฌThis is a nightly-only experimental API. (type_info)
pub const fn type_id(self) -> TypeId
type_info)Returns the TypeId of the actual field type.
#![feature(type_info)]
use std::any::TypeId;
struct Point {
x: u32,
y: u32,
}
assert_eq!(
const { TypeId::of::<Point>().field(0, 0).type_id() },
TypeId::of::<u32>()
);Trait Implementationsยง
impl Copy for FieldId
impl Eq for FieldId
Sourceยงimpl Ord for FieldId
impl Ord for FieldId
1.21.0 (const: unstable) ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Sourceยงimpl PartialEq for FieldId
impl PartialEq for FieldId
Sourceยงimpl PartialOrd for FieldId
impl PartialOrd for FieldId
impl StructuralPartialEq for FieldId
Auto Trait Implementationsยง
impl Freeze for FieldId
impl RefUnwindSafe for FieldId
impl Send for FieldId
impl Sync for FieldId
impl Unpin for FieldId
impl UnsafeUnpin for FieldId
impl UnwindSafe for FieldId
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