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§
Sourcetype Family: ContractFamily
type Family: ContractFamily
Contract family this extractor belongs to.
Required Methods§
Sourcefn extract<C: EntityCategory>(
&self,
entity: &Entity<C>,
manual: &ResolvedManual,
) -> Vec<IntraLink>
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".