Skip to main content

ResourceBindings

Trait ResourceBindings 

Source
pub trait ResourceBindings<'r>: Sized {
    type Binding: Copy + Eq + 'static;

    // Required method
    fn from_bindings(
        manager: &'r mut ResourceManager,
        mapping: Option<&ResourceBindingMap<Self::Binding>>,
    ) -> Result<Self, CuError>;
}
Expand description

Trait implemented by resource binding structs passed to task/bridge constructors. Implementors pull the concrete resources they need from the ResourceManager, using the symbolic mapping provided in the Copper config (resources: { name: "bundle.resource" }).

Required Associated Types§

Source

type Binding: Copy + Eq + 'static

Required Methods§

Source

fn from_bindings( manager: &'r mut ResourceManager, mapping: Option<&ResourceBindingMap<Self::Binding>>, ) -> Result<Self, CuError>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'r> ResourceBindings<'r> for ()

Implementors§