Skip to main content

LinkExtractor

Trait LinkExtractor 

Source
pub trait LinkExtractor: Send + Sync {
    type Family: ContractFamily;

    // Required methods
    fn name(&self) -> &'static str;
    fn extract<C: EntityCategory>(
        &self,
        entity: &Entity<C>,
        manual: &ResolvedManual,
    ) -> Vec<IntraLink>;
}
Expand description

Extract intra-links from entity prose (sync, in-memory resolution).

Family parser crates implement this trait. Extraction may produce LinkTarget::Unresolved for unknown targets; strip those before wire serialize.

Required Associated Types§

Source

type Family: ContractFamily

Contract family this extractor belongs to.

Required Methods§

Source

fn name(&self) -> &'static str

Short extractor name (e.g. "protobuf-fqn").

Source

fn extract<C: EntityCategory>( &self, entity: &Entity<C>, manual: &ResolvedManual, ) -> Vec<IntraLink>

Extracts prose-level links from entity against the manual address space.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§