[−][src]Struct wascc_actor::objectstore::ObjectStoreHostBinding
An abstraction around a host runtime capability for a key-value store
Implementations
impl ObjectStoreHostBinding
[src]
pub fn create_container(&self, name: &str) -> HandlerResult<Container>
[src]
Creates a new container within the store
pub fn remove_container(&self, name: &str) -> HandlerResult<()>
[src]
Removes a container from the store. Whether or not this will fail if the container has items may be specific to a given provider implementation.
pub fn remove_object(&self, name: &str, container: &str) -> HandlerResult<()>
[src]
Removes an object from a container
pub fn list_objects(&self, container: &str) -> HandlerResult<BlobList>
[src]
Lists all objects within a container
pub fn get_blob_info(
&self,
container: &str,
id: &str
) -> HandlerResult<Option<Blob>>
[src]
&self,
container: &str,
id: &str
) -> HandlerResult<Option<Blob>>
Obtains binary object metadata, does not include the object bytes
pub fn start_upload(
&self,
blob: &Blob,
chunk_size: u64,
total_bytes: u64
) -> HandlerResult<Transfer>
[src]
&self,
blob: &Blob,
chunk_size: u64,
total_bytes: u64
) -> HandlerResult<Transfer>
Indicates that an upload is about to begin for an item. You should follow this
call up with a for loop/iteration that sends successive chunks to the store. The chunk
size specified in this call is a request or suggestion. It is up to the provider to determine
the actual chunk size, which is returned in the resulting Transfer
instance
pub fn upload_chunk(
&self,
transfer: &Transfer,
offset: u64,
bytes: &[u8]
) -> HandlerResult<()>
[src]
&self,
transfer: &Transfer,
offset: u64,
bytes: &[u8]
) -> HandlerResult<()>
Uploads an individual chunk of a file to the blob store. This call must only ever
come after signaling the start of a new upload with the start_upload
function.
pub fn start_download(
&self,
blob: &Blob,
chunk_size: u64,
context: Option<String>
) -> HandlerResult<Transfer>
[src]
&self,
blob: &Blob,
chunk_size: u64,
context: Option<String>
) -> HandlerResult<Transfer>
Sends a request to the provider to begin a chunked download of a file. If this
succeeds, your actor will begin receiving OP_RECEIVE_CHUNK
messages from the
provider.
Trait Implementations
impl Default for ObjectStoreHostBinding
[src]
Auto Trait Implementations
impl RefUnwindSafe for ObjectStoreHostBinding
impl Send for ObjectStoreHostBinding
impl Sync for ObjectStoreHostBinding
impl Unpin for ObjectStoreHostBinding
impl UnwindSafe for ObjectStoreHostBinding
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,