Trait ThumbnailProvider

Source
pub trait ThumbnailProvider {
    type GatheredDataT: Hash + 'static;

    // Required methods
    fn asset_type(&self) -> &'static str;
    fn version(&self) -> u32;
    fn gather(
        &self,
        context: ThumbnailProviderGatherContext<'_>,
    ) -> Self::GatheredDataT;
    fn render<'a>(
        &'a self,
        context: &'a ThumbnailProviderRenderContext<'a>,
        gathered_data: Self::GatheredDataT,
    ) -> PipelineResult<ThumbnailImage>;
}

Required Associated Types§

Source

type GatheredDataT: Hash + 'static

Required Methods§

Source

fn asset_type(&self) -> &'static str

Source

fn version(&self) -> u32

Source

fn gather( &self, context: ThumbnailProviderGatherContext<'_>, ) -> Self::GatheredDataT

Source

fn render<'a>( &'a self, context: &'a ThumbnailProviderRenderContext<'a>, gathered_data: Self::GatheredDataT, ) -> PipelineResult<ThumbnailImage>

Implementors§