pub struct Struct { /* private fields */ }
Implementations§
source§impl Struct
impl Struct
pub fn module(self, db: &dyn HirDatabase) -> Module
pub fn file_id(self, db: &dyn HirDatabase) -> FileId
pub fn data(self, db: &dyn DefDatabase) -> Arc<StructData>
sourcepub fn name(self, db: &dyn HirDatabase) -> Name
pub fn name(self, db: &dyn HirDatabase) -> Name
Returns the name of the struct non including any module specifiers (e.g: Bar
).
sourcepub fn full_name(self, db: &dyn HirDatabase) -> String
pub fn full_name(self, db: &dyn HirDatabase) -> String
Returns the full name of the struct including all module specifiers (e.g: foo::Bar
).
pub fn fields(self, db: &dyn HirDatabase) -> Vec<Field>
pub fn field(self, db: &dyn HirDatabase, name: &Name) -> Option<Field>
pub fn ty(self, db: &dyn HirDatabase) -> Ty
pub fn lower(self, db: &dyn HirDatabase) -> Arc<LowerTyMap>
pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink<'_>)
Trait Implementations§
source§impl From<Struct> for CallableDef
impl From<Struct> for CallableDef
source§fn from(it: Struct) -> CallableDef
fn from(it: Struct) -> CallableDef
Converts to this type from the input type.
source§impl HasVisibility for Struct
impl HasVisibility for Struct
fn visibility(&self, db: &dyn HirDatabase) -> Visibility
impl Copy for Struct
impl Eq for Struct
impl StructuralEq for Struct
impl StructuralPartialEq for Struct
Auto Trait Implementations§
impl RefUnwindSafe for Struct
impl Send for Struct
impl Sync for Struct
impl Unpin for Struct
impl UnwindSafe for Struct
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.