Skip to main content

DynamicOrigin

Trait DynamicOrigin 

Source
pub trait DynamicOrigin: 'static {
    // Required methods
    fn kind(&self) -> SourceKind;
    fn update(&mut self, update: &mut DynamicOriginUpdate<'_>) -> Option<Cover>;
    fn start(
        &mut self,
        cx: &mut DynamicLoadContext<'_, '_>,
        copy: Option<DynamicWorldCopy<'_>>,
    ) -> Box<dyn Any>;

    // Provided methods
    fn receive(
        &mut self,
        _tile: &mut dyn Any,
        _reply: Box<dyn Any + Send>,
        _cx: &mut DynamicLoadContext<'_, '_>,
    ) { ... }
    fn set_necessity(
        &mut self,
        _tile: &mut dyn Any,
        _previous: TileNecessity,
        _cx: &mut DynamicLoadContext<'_, '_>,
    ) { ... }
    fn retry(
        &mut self,
        _tile: &mut dyn Any,
        _cx: &mut DynamicLoadContext<'_, '_>,
    ) { ... }
    fn failed(
        &mut self,
        _tile: &mut dyn Any,
        _cx: &mut DynamicLoadContext<'_, '_>,
    ) { ... }
}
Expand description

Render-thread tile origin for a DynamicSourceType.

Required Methods§

Source

fn kind(&self) -> SourceKind

Source

fn update(&mut self, update: &mut DynamicOriginUpdate<'_>) -> Option<Cover>

Source

fn start( &mut self, cx: &mut DynamicLoadContext<'_, '_>, copy: Option<DynamicWorldCopy<'_>>, ) -> Box<dyn Any>

Provided Methods§

Source

fn receive( &mut self, _tile: &mut dyn Any, _reply: Box<dyn Any + Send>, _cx: &mut DynamicLoadContext<'_, '_>, )

Source

fn set_necessity( &mut self, _tile: &mut dyn Any, _previous: TileNecessity, _cx: &mut DynamicLoadContext<'_, '_>, )

Source

fn retry(&mut self, _tile: &mut dyn Any, _cx: &mut DynamicLoadContext<'_, '_>)

Source

fn failed(&mut self, _tile: &mut dyn Any, _cx: &mut DynamicLoadContext<'_, '_>)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§