Skip to main content

ResourceIds

Trait ResourceIds 

Source
pub trait ResourceIds {
    // Required methods
    fn font(&mut self, font: &FontData) -> Result<FontId, WireError>;
    fn image(&mut self, image: &ImageData) -> Result<ImageId, WireError>;
}
Expand description

What an app’s encoder asks of its resource registry: the id a font or an image goes by on this connection, registering it on first sight.

Required Methods§

Source

fn font(&mut self, font: &FontData) -> Result<FontId, WireError>

The id font is registered under.

Source

fn image(&mut self, image: &ImageData) -> Result<ImageId, WireError>

The id image is registered under.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§