pub struct CppSentinelRecoveredOwner {
pub range: Range,
pub owner_name_start_byte: usize,
pub namespace_component_count: usize,
pub scope_components: Vec<String>,
}Expand description
Owned structural recovery metadata for a namespace-sentinel region.
Tree-sitter puts an ABSL_NAMESPACE_BEGIN region in a bogus function body
instead of the namespace/class scopes that the declaration visitor restores.
The inverted usage walk has the original CST, so it needs the same ownership
evidence without borrowing parser nodes across its file scan. Keep this
descriptor deliberately source-range based: callers can match a reference
node by containment and then resolve its structured type spelling in the
recovered class scope.
Fields§
§range: Range§owner_name_start_byte: usizeStart of the qualified owner name (btree<P>::method). A leading
return type before this byte is looked up from the namespace; parameters,
trailing returns, and the body use the member owner scope.
namespace_component_count: usizeNumber of leading components belonging to the namespace rather than the qualified class owner. A leading return type is looked up before every owner component, not merely before the innermost class.
scope_components: Vec<String>Trait Implementations§
Source§impl Clone for CppSentinelRecoveredOwner
impl Clone for CppSentinelRecoveredOwner
Source§fn clone(&self) -> CppSentinelRecoveredOwner
fn clone(&self) -> CppSentinelRecoveredOwner
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CppSentinelRecoveredOwner
impl RefUnwindSafe for CppSentinelRecoveredOwner
impl Send for CppSentinelRecoveredOwner
impl Sync for CppSentinelRecoveredOwner
impl Unpin for CppSentinelRecoveredOwner
impl UnsafeUnpin for CppSentinelRecoveredOwner
impl UnwindSafe for CppSentinelRecoveredOwner
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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