pub trait HasVisibility {
// Required method
fn visibility(&self, db: &dyn HirDatabase) -> Visibility;
// Provided method
fn is_visible_from(&self, db: &dyn HirDatabase, module: Module) -> bool { ... }
}
Required Methods§
fn visibility(&self, db: &dyn HirDatabase) -> Visibility
Provided Methods§
fn is_visible_from(&self, db: &dyn HirDatabase, module: Module) -> bool
Implementors§
impl HasVisibility for Adt
impl HasVisibility for AssocItem
impl HasVisibility for ModuleDef
impl HasVisibility for Const
impl HasVisibility for Enum
impl HasVisibility for ExternCrateDecl
impl HasVisibility for Field
impl HasVisibility for Function
impl HasVisibility for Macro
impl HasVisibility for Module
impl HasVisibility for Static
impl HasVisibility for Struct
impl HasVisibility for Trait
impl HasVisibility for TraitAlias
impl HasVisibility for TypeAlias
impl HasVisibility for Union
impl HasVisibility for Variant
Variants inherit visibility from the parent enum.