Skip to main content

detect

Function detect 

Source
pub fn detect(url: &str) -> Result<Box<dyn TranscriptSource>>
Expand description

Probe every registered source in priority order and construct the first whose TranscriptSource::matches recognises url.

Returns TranscriptError::InvalidLocator when no registered source claims the locator.

Registering a new source is one arm here plus a pub mod in crate::transcript::sources — see the “Adding a new source” recipe in docs/transcript.md.