pub trait Host:
Send
+ HostBucket
+ Sized
+ Send {
// Required methods
fn open(
&mut self,
identifier: String,
) -> impl Future<Output = Result<Resource<Bucket>, Error>> + Send;
fn convert_error(&mut self, err: Error) -> Result<Error>;
}
Required Methods§
Sourcefn open(
&mut self,
identifier: String,
) -> impl Future<Output = Result<Resource<Bucket>, Error>> + Send
fn open( &mut self, identifier: String, ) -> impl Future<Output = Result<Resource<Bucket>, Error>> + Send
Get the bucket with the specified identifier.
identifier
must refer to a bucket provided by the host.
error::no-such-store
will be raised if the identifier
is not recognized.
fn convert_error(&mut self, err: Error) -> Result<Error>
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.
Implementations on Foreign Types§
Source§impl<_T: Host + ?Sized + Send> Host for &mut _T
impl<_T: Host + ?Sized + Send> Host for &mut _T
Source§async fn open(&mut self, identifier: String) -> Result<Resource<Bucket>, Error>
async fn open(&mut self, identifier: String) -> Result<Resource<Bucket>, Error>
Get the bucket with the specified identifier.
identifier
must refer to a bucket provided by the host.
error::no-such-store
will be raised if the identifier
is not recognized.