pub trait Resource {
type Output;
type Error;
fn try_create(&self) -> Result<Self::Output, Self::Error>;
}
Expand description
A factory which produces a resource for use with ResourcePool
.
Associated Types
Required methods
fn try_create(&self) -> Result<Self::Output, Self::Error>
fn try_create(&self) -> Result<Self::Output, Self::Error>
Constructor for the resource.