Trait fontpm_api::source::Source

source ·
pub trait Source<'host>: Send + Sync {
    // Required methods
    fn id(&self) -> &'host str;
    fn name(&self) -> &'host str;
    fn set_host(&mut self, host: &'host dyn FpmHost);
    fn refresh<'life0, 'async_trait>(
        &'life0 self,
        force_refresh: bool
    ) -> Pin<Box<dyn Future<Output = Result<RefreshOutput, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn resolve_font<'life0, 'life1, 'async_trait>(
        &'life0 self,
        spec: &'life1 FontInstallSpec
    ) -> Pin<Box<dyn Future<Output = Result<(DefinedFontInstallSpec, FontDescription), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn download_font<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        spec: &'life1 DefinedFontInstallSpec,
        dir: &'life2 PathBuf
    ) -> Pin<Box<dyn Future<Output = Result<HashMap<DefinedFontVariantSpec, PathBuf>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided method
    fn description(&self) -> SourceDescription { ... }
}

Required Methods§

source

fn id(&self) -> &'host str

source

fn name(&self) -> &'host str

source

fn set_host(&mut self, host: &'host dyn FpmHost)

source

fn refresh<'life0, 'async_trait>( &'life0 self, force_refresh: bool ) -> Pin<Box<dyn Future<Output = Result<RefreshOutput, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn resolve_font<'life0, 'life1, 'async_trait>( &'life0 self, spec: &'life1 FontInstallSpec ) -> Pin<Box<dyn Future<Output = Result<(DefinedFontInstallSpec, FontDescription), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn download_font<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, spec: &'life1 DefinedFontInstallSpec, dir: &'life2 PathBuf ) -> Pin<Box<dyn Future<Output = Result<HashMap<DefinedFontVariantSpec, PathBuf>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Provided Methods§

Implementors§