pub enum CallgraphBlob {
Parse(ParseBlob),
Config(ConfigBlob),
}Expand description
The immutable callgraph blob payload. A regular source blob has parse output only; a configuration blob is intentionally raw so its manifest-scoped resolver settings can be interpreted during assembly.
Variants§
Parse(ParseBlob)
Config(ConfigBlob)
Implementations§
Source§impl CallgraphBlob
impl CallgraphBlob
Sourcepub fn extract(
source: &str,
language: &str,
extractor_version: impl Into<String>,
) -> Result<Self, ManifestJoinError>
pub fn extract( source: &str, language: &str, extractor_version: impl Into<String>, ) -> Result<Self, ManifestJoinError>
Extracts path-free callgraph parse output from source bytes and the extractor version that names the corresponding content key.
Sourcepub fn extract_tree_with_outline(
source: &str,
language: &str,
extractor_version: impl Into<String>,
tree: &Tree,
) -> Result<(Self, Vec<Symbol>), ManifestJoinError>
pub fn extract_tree_with_outline( source: &str, language: &str, extractor_version: impl Into<String>, tree: &Tree, ) -> Result<(Self, Vec<Symbol>), ManifestJoinError>
[Self::extract_tree], also returning the file’s symbols as the
parser extracts them for outline: the same table, from the same walk,
before the call graph qualifies, adds or merges any.
Sourcepub fn extract_reference(
source: &str,
language: &str,
extractor_version: impl Into<String>,
) -> Result<Self, ManifestJoinError>
pub fn extract_reference( source: &str, language: &str, extractor_version: impl Into<String>, ) -> Result<Self, ManifestJoinError>
The extractor before the single walk: the same passes, each walking
the tree itself and asking tree-sitter for parents and siblings. It
stays only so the extraction gate (data_layer::extract_gate) can
check both give the same output.
Sourcepub fn config(
source: impl Into<Vec<u8>>,
extractor_version: impl Into<String>,
) -> Self
pub fn config( source: impl Into<Vec<u8>>, extractor_version: impl Into<String>, ) -> Self
Builds a manifest configuration input. The caller keys it with the
file’s configuration language (plain config, or config-<grammar>
when the record also holds TODO markers read in that grammar; see
data_layer::content::is_config_language) and the same extractor
version stored here. The blob itself always names plain config:
it holds the file’s bytes whole, which do not depend on the grammar,
and readers take the language from the path record, not from here.
Sourcepub fn to_bytes(&self) -> Result<Vec<u8>, ManifestJoinError>
pub fn to_bytes(&self) -> Result<Vec<u8>, ManifestJoinError>
Uses one canonical JSON encoding for the immutable payload bytes.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, ManifestJoinError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, ManifestJoinError>
Decodes a payload after the blob store has verified its digest and schema.
pub fn parse(&self) -> Option<&ParseBlob>
pub fn config_source(&self) -> Option<&ConfigBlob>
Trait Implementations§
Source§impl Clone for CallgraphBlob
impl Clone for CallgraphBlob
Source§impl Debug for CallgraphBlob
impl Debug for CallgraphBlob
Source§impl<'de> Deserialize<'de> for CallgraphBlob
impl<'de> Deserialize<'de> for CallgraphBlob
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CallgraphBlob
Source§impl PartialEq for CallgraphBlob
impl PartialEq for CallgraphBlob
Source§impl Serialize for CallgraphBlob
impl Serialize for CallgraphBlob
impl StructuralPartialEq for CallgraphBlob
Auto Trait Implementations§
impl Forget for CallgraphBlob
impl Freeze for CallgraphBlob
impl Move for CallgraphBlob
impl RefUnwindSafe for CallgraphBlob
impl Send for CallgraphBlob
impl Sync for CallgraphBlob
impl Unpin for CallgraphBlob
impl UnsafeUnpin for CallgraphBlob
impl UnwindSafe for CallgraphBlob
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
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> ⓘ
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