pub struct ParseOutput(/* private fields */);Expand description
Memoised result of parsing a SourceFile.
Wraps an Arc<Parse>; equality is by pointer identity so that Salsa
can detect when re-parsing produced the same tree.
Implementations§
Source§impl ParseOutput
impl ParseOutput
Sourcepub fn strong_count(&self) -> usize
pub fn strong_count(&self) -> usize
Strong-reference count of the wrapped Arc<Parse>.
Exposed so tests and memory-diagnostics tooling can observe Salsa
memo retention (§11.6): after a FileId is evicted and the next
revision replaces the memo entry for its SourceFile, the old
ParseOutput held by the memo is dropped and any caller-held clone
of its Arc<Parse> sees its strong count drop to 1.
Trait Implementations§
Source§impl Clone for ParseOutput
impl Clone for ParseOutput
Source§fn clone(&self) -> ParseOutput
fn clone(&self) -> ParseOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ParseOutput
impl Debug for ParseOutput
Source§impl PartialEq for ParseOutput
impl PartialEq for ParseOutput
Source§fn eq(&self, other: &ParseOutput) -> bool
fn eq(&self, other: &ParseOutput) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ParseOutput
Auto Trait Implementations§
impl Freeze for ParseOutput
impl RefUnwindSafe for ParseOutput
impl Send for ParseOutput
impl Sync for ParseOutput
impl Unpin for ParseOutput
impl UnsafeUnpin for ParseOutput
impl UnwindSafe for ParseOutput
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§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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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