pub struct RecoveredNamespaceRegion {
pub start: usize,
pub end: usize,
pub components: Vec<String>,
pub component_ranges: Vec<Range>,
pub component_closes: Vec<Option<Range>>,
}Expand description
One run of a container’s children whose parsed namespaces differ from their lexical namespaces, with the complete lexical namespace path.
Fields§
§start: usizeStart byte of the first child in the run.
end: usizeEnd byte of the last child in the run.
components: Vec<String>The complete enclosing namespace path of the run, outermost first. This can be empty when a parsed namespace extends past its real close.
component_ranges: Vec<Range>The namespace Name { ... } construct that opens each of components,
parallel to it, from the namespace keyword through the matching close
the brace stack paired with its {. A level whose close the stack could
not prove – the file never closes it, or the file’s brace token stream
lost an opening token (#3328) – carries its head alone. This is the
range the declaration walk records for the Module, so a namespace whose
head collapsed into an ERROR reports where it is written rather than
where its first member is (#3309).
component_closes: Vec<Option<Range>>The close the brace stack paired with each level’s {, parallel to
components. A node after that close is outside the level (#3633).
None when the file never closes the level or the walk proved no
pairing in the file (#3328); the level then applies to the whole region
as a best-effort scope.
Trait Implementations§
Source§impl Clone for RecoveredNamespaceRegion
impl Clone for RecoveredNamespaceRegion
Source§impl Debug for RecoveredNamespaceRegion
impl Debug for RecoveredNamespaceRegion
impl Eq for RecoveredNamespaceRegion
Source§impl PartialEq for RecoveredNamespaceRegion
impl PartialEq for RecoveredNamespaceRegion
impl StructuralPartialEq for RecoveredNamespaceRegion
Auto Trait Implementations§
impl Freeze for RecoveredNamespaceRegion
impl RefUnwindSafe for RecoveredNamespaceRegion
impl Send for RecoveredNamespaceRegion
impl Sync for RecoveredNamespaceRegion
impl Unpin for RecoveredNamespaceRegion
impl UnsafeUnpin for RecoveredNamespaceRegion
impl UnwindSafe for RecoveredNamespaceRegion
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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