Trait irondash_texture::PayloadProvider
source · pub trait PayloadProvider<Type>: Send + Sync {
// Required method
fn get_payload(&self) -> Type;
}
Expand description
Trait that implemented by objects that provide texture contents.
Required Methods§
sourcefn get_payload(&self) -> Type
fn get_payload(&self) -> Type
Called by the engine to get the latest texture payload. This will most likely be called on raster thread. Hence PayloadProvider must be thread safe.
Boxed payload is used to allow custom payload objects, which might be useful in situation where the provider needs to know when Flutter is done with the payload (i.e. by implementing Drop trait on the payload object).