pub struct Field { /* private fields */ }
Expand description
A field of a Struct
.
Implementations§
source§impl Field
impl Field
sourcepub fn ty(self, db: &dyn HirDatabase) -> Ty
pub fn ty(self, db: &dyn HirDatabase) -> Ty
Returns the type of the field
sourcepub fn name(self, db: &dyn HirDatabase) -> Name
pub fn name(self, db: &dyn HirDatabase) -> Name
Returns the name of the field
sourcepub fn index(self, _db: &dyn HirDatabase) -> u32
pub fn index(self, _db: &dyn HirDatabase) -> u32
Returns the index of this field in the parent
Trait Implementations§
impl Copy for Field
impl Eq for Field
impl StructuralEq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.