Skip to main content

HardwareFrameLease

Trait HardwareFrameLease 

Source
pub trait HardwareFrameLease:
    Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn retained_bytes(&self) -> u64;
    fn as_any(&self) -> &dyn Any;
    fn into_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync> ⓘ;
}
Expand description

Opaque decoder surface retained until GPU completion.

Required Methods§

Source

fn retained_bytes(&self) -> u64

Approximate allocation size charged to the surface budget.

Source

fn as_any(&self) -> &dyn Any

Allows the platform interop crate to recover its private lease type.

Source

fn into_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync> ⓘ

Converts a retained lease for platform-specific import without exposing the backend type in the common frame enum.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl HardwareFrameLease for VulkanFrameLease

Available on Linux and crate feature hwdecode only.
Source§

fn retained_bytes(&self) -> u64

Source§

fn as_any(&self) -> &dyn Any

Source§

fn into_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync> ⓘ

Implementors§