[][src]Struct wascc_actor::objectstore::ObjectStoreHostBinding

pub struct ObjectStoreHostBinding { /* fields omitted */ }

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]

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]

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]

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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.