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>>,
    ) -> CuResult<Self>;
}
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>>, ) -> CuResult<Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

type Binding = ()

Source§

fn from_bindings( _manager: &'r mut ResourceManager, _mapping: Option<&ResourceBindingMap<Self::Binding>>, ) -> CuResult<Self>

Implementors§