Skip to main content

DynamicSourceHandler

Trait DynamicSourceHandler 

Source
pub trait DynamicSourceHandler:
    Send
    + Sync
    + 'static {
    // Required method
    fn supply(&self, source: &Source) -> Box<dyn DynamicOrigin>;

    // Provided methods
    fn attribution(&self, _source: &Source) -> Option<String> { ... }
    fn summary(&self, _source: &Source) -> SourceSummary { ... }
    fn load(&self, _source: &Source) -> Load<ErasedDescription> { ... }
    fn describes_in_background(&self) -> bool { ... }
    fn describes_in_world(&self) -> bool { ... }
    fn describe(
        &self,
        _source: &Source,
        _world: &WorldMapping,
        _data: Option<Data>,
        respond: Respond<Described<ErasedDescription>>,
    ) { ... }
    fn describe_image(
        &self,
        _source: &Source,
        _image: PremultipliedImage,
    ) -> Described<ErasedDescription> { ... }
    fn metadata_changed(&self, _previous: &Source, _source: &Source) -> bool { ... }
}
Expand description

Type-level hooks for a DynamicSourceType.

Required Methods§

Source

fn supply(&self, source: &Source) -> Box<dyn DynamicOrigin>

Provided Methods§

Source

fn attribution(&self, _source: &Source) -> Option<String>

Source

fn summary(&self, _source: &Source) -> SourceSummary

Source

fn load(&self, _source: &Source) -> Load<ErasedDescription>

Source

fn describes_in_background(&self) -> bool

Source

fn describes_in_world(&self) -> bool

Source

fn describe( &self, _source: &Source, _world: &WorldMapping, _data: Option<Data>, respond: Respond<Described<ErasedDescription>>, )

Source

fn describe_image( &self, _source: &Source, _image: PremultipliedImage, ) -> Described<ErasedDescription>

Source

fn metadata_changed(&self, _previous: &Source, _source: &Source) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§