pub trait Resource {
    type Output;
    type Error;

    // Required method
    fn try_create(&self) -> Result<Self::Output, Self::Error>;
}
Expand description

A factory which produces a resource for use with ResourcePool.

Required Associated Types§

source

type Output

The type of the resource to be produced.

source

type Error

An error type.

Required Methods§

source

fn try_create(&self) -> Result<Self::Output, Self::Error>

Constructor for the resource.

Implementors§