Skip to main content

FormatDiscovery

Trait FormatDiscovery 

Source
pub trait FormatDiscovery {
    type Format;

    // Required methods
    fn started(&self);
    fn available(&self, formats: Vec<Self::Format>);
    fn failed(&self, message: String);
}
Expand description

Defines the first-order observation stream of format discovery.

An observation is a method, so the reified stream is generated from this vocabulary rather than written out. An interpreter states what each observation means and never restates the shape.

Required Associated Types§

Source

type Format

Represents one described selectable format.

Required Methods§

Source

fn started(&self)

Denotes that an interpreter started source inspection.

Source

fn available(&self, formats: Vec<Self::Format>)

Supplies the described formats in extractor preference order.

Source

fn failed(&self, message: String)

Denotes source inspection failure.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§