enum SourceGraph<'a> {
Staged {
graph: &'a SymbolGraph,
semantics: Option<&'a SourceSemanticFacts>,
},
Captured(Arc<CapturedSourceGraph>),
Persisted(SymbolGraph),
}Expand description
Graph ownership retains its corresponding source proof through projection.
Variants§
Staged
Already-admitted fresh parser output, borrowed without another parse/copy.
Fields
§
graph: &'a SymbolGraphRaw graph in its actual parser ordering.
§
semantics: Option<&'a SourceSemanticFacts>Corresponding source proof when the native parser produced it.
Captured(Arc<CapturedSourceGraph>)
Required unchanged source recovered once from verified captured bytes.
Persisted(SymbolGraph)
A graph whose parser contract does not require lexical source evidence.
Implementations§
Source§impl SourceGraph<'_>
impl SourceGraph<'_>
Sourcefn graph(&self) -> &SymbolGraph
fn graph(&self) -> &SymbolGraph
Borrow the exact graph whose ordinals own this source proof.
Sourcefn semantics(&self) -> Option<&SourceSemanticFacts>
fn semantics(&self) -> Option<&SourceSemanticFacts>
Borrow source evidence without reconstructing it from stored display text.
Trait Implementations§
Source§impl AsRef<SymbolGraph> for SourceGraph<'_>
impl AsRef<SymbolGraph> for SourceGraph<'_>
Source§fn as_ref(&self) -> &SymbolGraph
fn as_ref(&self) -> &SymbolGraph
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<SymbolGraph> for SourceGraph<'_>
impl Borrow<SymbolGraph> for SourceGraph<'_>
Source§fn borrow(&self) -> &SymbolGraph
fn borrow(&self) -> &SymbolGraph
Immutably borrows from an owned value. Read more
Source§impl<'a> From<Cow<'a, SymbolGraph>> for SourceGraph<'a>
impl<'a> From<Cow<'a, SymbolGraph>> for SourceGraph<'a>
Source§fn from(graph: Cow<'a, SymbolGraph>) -> Self
fn from(graph: Cow<'a, SymbolGraph>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for SourceGraph<'a>
impl<'a> RefUnwindSafe for SourceGraph<'a>
impl<'a> Send for SourceGraph<'a>
impl<'a> Sync for SourceGraph<'a>
impl<'a> Unpin for SourceGraph<'a>
impl<'a> UnsafeUnpin for SourceGraph<'a>
impl<'a> UnwindSafe for SourceGraph<'a>
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<'a, T> FromIn<'a, T> for T
impl<'a, T> FromIn<'a, T> for T
§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