Struct hir_def::dyn_map::keys::AstPtrPolicy
source · pub struct AstPtrPolicy<AST, ID> { /* private fields */ }
Expand description
XXX: AST Nodes and SyntaxNodes have identity equality semantics: nodes are equal if they point to exactly the same object.
In general, we do not guarantee that we have exactly one instance of a syntax tree for each file. We probably should add such guarantee, but, for the time being, we will use identity-less AstPtr comparison.
Trait Implementations§
source§impl<AST: AstNode + 'static, ID: 'static> Policy for AstPtrPolicy<AST, ID>
impl<AST: AstNode + 'static, ID: 'static> Policy for AstPtrPolicy<AST, ID>
Auto Trait Implementations§
impl<AST, ID> Freeze for AstPtrPolicy<AST, ID>
impl<AST, ID> RefUnwindSafe for AstPtrPolicy<AST, ID>where
AST: RefUnwindSafe,
ID: RefUnwindSafe,
impl<AST, ID> Send for AstPtrPolicy<AST, ID>
impl<AST, ID> Sync for AstPtrPolicy<AST, ID>
impl<AST, ID> Unpin for AstPtrPolicy<AST, ID>
impl<AST, ID> UnwindSafe for AstPtrPolicy<AST, ID>where
AST: UnwindSafe,
ID: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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