pub struct LocatedNamespace {
pub name: SmolStr,
pub name_loc: Option<Loc>,
pub def_loc: Option<Loc>,
}Available on crate feature
extended-schema only.Expand description
Represents a namespace definition in the schema. This does not store the actual contents of the namespace and instead only stores where the namespace was defined. Namespaces are used to quality type definitions while constructing the schema. Once the schema is built, we only need to know about namespace definitions to support go-to source operations in the LSP.
Fields§
§name: SmolStrName of namespace
name_loc: Option<Loc>Namespace name source location if available
def_loc: Option<Loc>Namespace definition source location if available
Trait Implementations§
Source§impl Clone for LocatedNamespace
impl Clone for LocatedNamespace
Source§fn clone(&self) -> LocatedNamespace
fn clone(&self) -> LocatedNamespace
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocatedNamespace
impl Debug for LocatedNamespace
Source§impl Hash for LocatedNamespace
impl Hash for LocatedNamespace
Source§impl PartialEq for LocatedNamespace
impl PartialEq for LocatedNamespace
impl Eq for LocatedNamespace
Auto Trait Implementations§
impl Freeze for LocatedNamespace
impl RefUnwindSafe for LocatedNamespace
impl Send for LocatedNamespace
impl Sync for LocatedNamespace
impl Unpin for LocatedNamespace
impl UnsafeUnpin for LocatedNamespace
impl UnwindSafe for LocatedNamespace
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more