pub trait HostContainer: Send {
// Required methods
fn name(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<String, Error>>> + Send;
fn info(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<ContainerMetadata, Error>>> + Send;
fn get_data(
&mut self,
self_: Resource<Container>,
name: ObjectName,
start: u64,
end: u64,
) -> impl Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send;
fn write_data(
&mut self,
self_: Resource<Container>,
name: ObjectName,
data: Resource<OutgoingValue>,
) -> impl Future<Output = Result<Result<(), Error>>> + Send;
fn list_objects(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send;
fn delete_object(
&mut self,
self_: Resource<Container>,
name: ObjectName,
) -> impl Future<Output = Result<Result<(), Error>>> + Send;
fn delete_objects(
&mut self,
self_: Resource<Container>,
names: Vec<ObjectName>,
) -> impl Future<Output = Result<Result<(), Error>>> + Send;
fn has_object(
&mut self,
self_: Resource<Container>,
name: ObjectName,
) -> impl Future<Output = Result<Result<bool, Error>>> + Send;
fn object_info(
&mut self,
self_: Resource<Container>,
name: ObjectName,
) -> impl Future<Output = Result<Result<ObjectMetadata, Error>>> + Send;
fn clear(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<(), Error>>> + Send;
fn drop(
&mut self,
rep: Resource<Container>,
) -> impl Future<Output = Result<()>> + Send;
}Required Methods§
Sourcefn name(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<String, Error>>> + Send
fn name( &mut self, self_: Resource<Container>, ) -> impl Future<Output = Result<Result<String, Error>>> + Send
returns container name
Sourcefn info(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<ContainerMetadata, Error>>> + Send
fn info( &mut self, self_: Resource<Container>, ) -> impl Future<Output = Result<Result<ContainerMetadata, Error>>> + Send
returns container metadata
Sourcefn get_data(
&mut self,
self_: Resource<Container>,
name: ObjectName,
start: u64,
end: u64,
) -> impl Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send
fn get_data( &mut self, self_: Resource<Container>, name: ObjectName, start: u64, end: u64, ) -> impl Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send
retrieves an object or portion of an object, as a resource. Start and end offsets are inclusive. Once a data-blob resource has been created, the underlying bytes are held by the blobstore service for the lifetime of the data-blob resource, even if the object they came from is later deleted.
Sourcefn write_data(
&mut self,
self_: Resource<Container>,
name: ObjectName,
data: Resource<OutgoingValue>,
) -> impl Future<Output = Result<Result<(), Error>>> + Send
fn write_data( &mut self, self_: Resource<Container>, name: ObjectName, data: Resource<OutgoingValue>, ) -> impl Future<Output = Result<Result<(), Error>>> + Send
creates or replaces an object with the data blob.
Sourcefn list_objects(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send
fn list_objects( &mut self, self_: Resource<Container>, ) -> impl Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send
returns list of objects in the container. Order is undefined.
Sourcefn delete_object(
&mut self,
self_: Resource<Container>,
name: ObjectName,
) -> impl Future<Output = Result<Result<(), Error>>> + Send
fn delete_object( &mut self, self_: Resource<Container>, name: ObjectName, ) -> impl Future<Output = Result<Result<(), Error>>> + Send
deletes object. does not return error if object did not exist.
Sourcefn delete_objects(
&mut self,
self_: Resource<Container>,
names: Vec<ObjectName>,
) -> impl Future<Output = Result<Result<(), Error>>> + Send
fn delete_objects( &mut self, self_: Resource<Container>, names: Vec<ObjectName>, ) -> impl Future<Output = Result<Result<(), Error>>> + Send
deletes multiple objects in the container
Sourcefn has_object(
&mut self,
self_: Resource<Container>,
name: ObjectName,
) -> impl Future<Output = Result<Result<bool, Error>>> + Send
fn has_object( &mut self, self_: Resource<Container>, name: ObjectName, ) -> impl Future<Output = Result<Result<bool, Error>>> + Send
returns true if the object exists in this container
Sourcefn object_info(
&mut self,
self_: Resource<Container>,
name: ObjectName,
) -> impl Future<Output = Result<Result<ObjectMetadata, Error>>> + Send
fn object_info( &mut self, self_: Resource<Container>, name: ObjectName, ) -> impl Future<Output = Result<Result<ObjectMetadata, Error>>> + Send
returns metadata for the object
Sourcefn clear(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<(), Error>>> + Send
fn clear( &mut self, self_: Resource<Container>, ) -> impl Future<Output = Result<Result<(), Error>>> + Send
removes all objects within the container, leaving the container empty.
fn drop( &mut self, rep: Resource<Container>, ) -> impl Future<Output = Result<()>> + Send
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: HostContainer + ?Sized + Send> HostContainer for &mut _T
impl<_T: HostContainer + ?Sized + Send> HostContainer for &mut _T
Source§fn name(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<String, Error>>> + Send
fn name( &mut self, self_: Resource<Container>, ) -> impl Future<Output = Result<Result<String, Error>>> + Send
returns container name
Source§fn info(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<ContainerMetadata, Error>>> + Send
fn info( &mut self, self_: Resource<Container>, ) -> impl Future<Output = Result<Result<ContainerMetadata, Error>>> + Send
returns container metadata
Source§fn get_data(
&mut self,
self_: Resource<Container>,
name: ObjectName,
start: u64,
end: u64,
) -> impl Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send
fn get_data( &mut self, self_: Resource<Container>, name: ObjectName, start: u64, end: u64, ) -> impl Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send
retrieves an object or portion of an object, as a resource. Start and end offsets are inclusive. Once a data-blob resource has been created, the underlying bytes are held by the blobstore service for the lifetime of the data-blob resource, even if the object they came from is later deleted.
Source§fn write_data(
&mut self,
self_: Resource<Container>,
name: ObjectName,
data: Resource<OutgoingValue>,
) -> impl Future<Output = Result<Result<(), Error>>> + Send
fn write_data( &mut self, self_: Resource<Container>, name: ObjectName, data: Resource<OutgoingValue>, ) -> impl Future<Output = Result<Result<(), Error>>> + Send
creates or replaces an object with the data blob.
Source§fn list_objects(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send
fn list_objects( &mut self, self_: Resource<Container>, ) -> impl Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send
returns list of objects in the container. Order is undefined.
Source§fn delete_object(
&mut self,
self_: Resource<Container>,
name: ObjectName,
) -> impl Future<Output = Result<Result<(), Error>>> + Send
fn delete_object( &mut self, self_: Resource<Container>, name: ObjectName, ) -> impl Future<Output = Result<Result<(), Error>>> + Send
deletes object. does not return error if object did not exist.
Source§fn delete_objects(
&mut self,
self_: Resource<Container>,
names: Vec<ObjectName>,
) -> impl Future<Output = Result<Result<(), Error>>> + Send
fn delete_objects( &mut self, self_: Resource<Container>, names: Vec<ObjectName>, ) -> impl Future<Output = Result<Result<(), Error>>> + Send
deletes multiple objects in the container
Source§fn has_object(
&mut self,
self_: Resource<Container>,
name: ObjectName,
) -> impl Future<Output = Result<Result<bool, Error>>> + Send
fn has_object( &mut self, self_: Resource<Container>, name: ObjectName, ) -> impl Future<Output = Result<Result<bool, Error>>> + Send
returns true if the object exists in this container
Source§fn object_info(
&mut self,
self_: Resource<Container>,
name: ObjectName,
) -> impl Future<Output = Result<Result<ObjectMetadata, Error>>> + Send
fn object_info( &mut self, self_: Resource<Container>, name: ObjectName, ) -> impl Future<Output = Result<Result<ObjectMetadata, Error>>> + Send
returns metadata for the object
Source§fn clear(
&mut self,
self_: Resource<Container>,
) -> impl Future<Output = Result<Result<(), Error>>> + Send
fn clear( &mut self, self_: Resource<Container>, ) -> impl Future<Output = Result<Result<(), Error>>> + Send
removes all objects within the container, leaving the container empty.