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§
Required Methods§
Sourcefn try_create(&self) -> Result<Self::Output, Self::Error>
fn try_create(&self) -> Result<Self::Output, Self::Error>
Constructor for the resource.