pub enum FieldId<'a> {
Unnamed(usize),
Named(&'a str),
}
Expand description
A locally unique identifier for a field within a certain type.
Variants§
Unnamed(usize)
An unnamed field with the specified index in a tuple-like struct; e.g. the 0
in foo.0
.
Named(&'a str)
A named field in a struct, e.g. the name
in foo.name
.
Trait Implementations§
Source§impl<'a> Ord for FieldId<'a>
impl<'a> Ord for FieldId<'a>
1.21.0 · 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<'a> PartialOrd for FieldId<'a>
impl<'a> PartialOrd for FieldId<'a>
impl<'a> Copy for FieldId<'a>
impl<'a> Eq for FieldId<'a>
impl<'a> StructuralPartialEq for FieldId<'a>
Auto Trait Implementations§
impl<'a> Freeze for FieldId<'a>
impl<'a> RefUnwindSafe for FieldId<'a>
impl<'a> Send for FieldId<'a>
impl<'a> Sync for FieldId<'a>
impl<'a> Unpin for FieldId<'a>
impl<'a> UnwindSafe for FieldId<'a>
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