Trait ResourceReloadProtocol
pub trait ResourceReloadProtocol {
// Required method
fn handle(
&self,
url: &KanziStr,
protocol: &KanziStr,
hostname: &KanziStr,
path: &KanziStr,
resource: Weak<Resource>,
) -> Result<(), Error>;
}Expand description
Use this trait to implement the protocol for reloading GPU resources.
Required Methods§
fn handle(
&self,
url: &KanziStr,
protocol: &KanziStr,
hostname: &KanziStr,
path: &KanziStr,
resource: Weak<Resource>,
) -> Result<(), Error>
fn handle( &self, url: &KanziStr, protocol: &KanziStr, hostname: &KanziStr, path: &KanziStr, resource: Weak<Resource>, ) -> Result<(), Error>
The reload function takes a resource URL and an existing resource, and reloads the resource. Kanzi uses this function only for GPU resources when an application loses GL context in a pause-resume event.