Trait wasmcloud_runtime::capability::blobstore::container::HostContainer
source · pub trait HostContainer {
// Required methods
fn name<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<String, Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<ContainerMetadata, Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_data<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
start: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn write_data<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
data: Resource<OutgoingValue>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
names: Vec<ObjectName>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn has_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<bool, Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn object_info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<ObjectMetadata, Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn clear<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn drop<'life0, 'async_trait>(
&'life0 mut self,
rep: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
sourcefn name<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<String, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn name<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<String, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns container name
sourcefn info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<ContainerMetadata, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<ContainerMetadata, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns container metadata
sourcefn get_data<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
start: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_data<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
start: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
data: Resource<OutgoingValue>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_data<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
data: Resource<OutgoingValue>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
creates or replaces an object with the data blob.
sourcefn list_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns list of objects in the container. Order is undefined.
sourcefn delete_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
deletes object. does not return error if object did not exist.
sourcefn delete_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
names: Vec<ObjectName>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
names: Vec<ObjectName>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
deletes multiple objects in the container
sourcefn has_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<bool, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<bool, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns true if the object exists in this container
sourcefn object_info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<ObjectMetadata, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn object_info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<ObjectMetadata, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns metadata for the object
sourcefn clear<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
removes all objects within the container, leaving the container empty.
fn drop<'life0, 'async_trait>(
&'life0 mut self,
rep: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<String, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn name<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<String, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns container name
source§fn info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<ContainerMetadata, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<ContainerMetadata, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns container metadata
source§fn get_data<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
start: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_data<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
start: u64,
end: u64,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<IncomingValue>, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
data: Resource<OutgoingValue>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_data<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
data: Resource<OutgoingValue>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
creates or replaces an object with the data blob.
source§fn list_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<Resource<StreamObjectNames>, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns list of objects in the container. Order is undefined.
source§fn delete_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
deletes object. does not return error if object did not exist.
source§fn delete_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
names: Vec<ObjectName>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_objects<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
names: Vec<ObjectName>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
deletes multiple objects in the container
source§fn has_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<bool, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_object<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<bool, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns true if the object exists in this container
source§fn object_info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<ObjectMetadata, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn object_info<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
name: ObjectName,
) -> Pin<Box<dyn Future<Output = Result<Result<ObjectMetadata, Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
returns metadata for the object
source§fn clear<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 mut self,
self_: Resource<Container>,
) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
removes all objects within the container, leaving the container empty.