pub trait FieldInfo {
// Required methods
fn ident(&self) -> &Option<Ident>;
fn vis(&self) -> &Visibility;
fn ty(&self) -> &Type;
// Provided method
fn as_ident(&self, ix: usize) -> Ident { ... }
}
Expand description
Trait to retrieve fields’ properties
Required Methods§
Sourcefn ident(&self) -> &Option<Ident>
fn ident(&self) -> &Option<Ident>
Retrieves the identifier of the passed-in field, or None for tuple fields
Sourcefn vis(&self) -> &Visibility
fn vis(&self) -> &Visibility
Retrieves the visibility of the passed-in field