pub trait ResourceBindings<'r>: Sized {
type Binding: Copy + Eq + 'static;
const NAMES: &'static [&'static str] = _;
// Required method
fn from_bindings(
manager: &'r mut ResourceManager,
mapping: Option<&ResourceBindingMap<Self::Binding>>,
) -> CuResult<Self>;
// Provided method
fn from_keys(
_manager: &'r mut ResourceManager,
_keys: &[ResourceKey],
) -> 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" }).
Provided Associated Constants§
Required Associated Types§
Required Methods§
fn from_bindings( manager: &'r mut ResourceManager, mapping: Option<&ResourceBindingMap<Self::Binding>>, ) -> CuResult<Self>
Provided Methods§
Sourcefn from_keys(
_manager: &'r mut ResourceManager,
_keys: &[ResourceKey],
) -> CuResult<Self>
fn from_keys( _manager: &'r mut ResourceManager, _keys: &[ResourceKey], ) -> CuResult<Self>
Construct bundle inputs from compile-time resolved keys.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".