vm_resource

Trait ResolveResource

Source
pub trait ResolveResource<K: CanResolveTo<Self::Output>, T>: Send + Sync {
    type Output;
    type Error: Into<Box<dyn Error + Send + Sync>>;

    // Required method
    fn resolve(
        &self,
        resource: T,
        input: K::Input<'_>,
    ) -> Result<Self::Output, Self::Error>;
}
Expand description

Trait implemented to resolve resource type T as resource kind K.

Required Associated Types§

Source

type Output

The output type for resource resolution.

Source

type Error: Into<Box<dyn Error + Send + Sync>>

The error type for resolve.

Required Methods§

Source

fn resolve( &self, resource: T, input: K::Input<'_>, ) -> Result<Self::Output, Self::Error>

Resolves the resource.

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.

Implementors§