Skip to main content

Detect

Trait Detect 

Source
pub trait Detect: Send + Sync {
    // Required methods
    fn kind(&self) -> FormatKind;
    fn root(&self, start: &Path) -> Option<PathBuf>;
    fn adapter(&self) -> Option<&'static dyn Adapter>;
}
Expand description

What every known format implements: finding its marker.

Required Methods§

Source

fn kind(&self) -> FormatKind

Which format.

Source

fn root(&self, start: &Path) -> Option<PathBuf>

The root containing start, by the format’s marker.

Source

fn adapter(&self) -> Option<&'static dyn Adapter>

The adapter, when this build runs the format.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§