pub struct Semantics {
pub import_scopes_names: bool,
pub addressable: &'static [SymbolKind],
pub visibility: &'static [VisibilityRule],
pub default_visibility: ReachKind,
}Fields§
§import_scopes_names: boolWhether importing a module brings its names into scope on its own.
false for Rust (use a::b; scopes b, not b::X; only use a::b::* does); true where the import grammar hides which names
are taken, as with import { X } from './b' today.
addressable: &'static [SymbolKind]Declarations a path can reach — structs, functions, modules. Methods, fields and variants are reached through a type, which syntax alone cannot follow, so only these can be a rename’s target.
visibility: &'static [VisibilityRule]Each visibility modifier and what it lets see the declaration.
default_visibility: ReachKindWhat a declaration without a modifier lets see it.
Implementations§
Source§impl Semantics
impl Semantics
pub fn is_addressable(&self, kind: SymbolKind) -> bool
Sourcepub fn reach_kind(&self, modifier: Option<&str>) -> ReachKind
pub fn reach_kind(&self, modifier: Option<&str>) -> ReachKind
The reach a modifier grants, or the default when there is none.
Trait Implementations§
impl Copy for Semantics
impl Eq for Semantics
impl StructuralPartialEq for Semantics
Auto Trait Implementations§
impl Freeze for Semantics
impl RefUnwindSafe for Semantics
impl Send for Semantics
impl Sync for Semantics
impl Unpin for Semantics
impl UnsafeUnpin for Semantics
impl UnwindSafe for Semantics
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