pub trait Host: Send {
    // Required methods
    fn create_container<'life0, 'async_trait>(
        &'life0 mut self,
        name: ContainerName,
    ) -> Pin<Box<dyn Future<Output = Result<Result<Resource<Container>, Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_container<'life0, 'async_trait>(
        &'life0 mut self,
        name: ContainerName,
    ) -> Pin<Box<dyn Future<Output = Result<Result<Resource<Container>, Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_container<'life0, 'async_trait>(
        &'life0 mut self,
        name: ContainerName,
    ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn container_exists<'life0, 'async_trait>(
        &'life0 mut self,
        name: ContainerName,
    ) -> Pin<Box<dyn Future<Output = Result<Result<bool, Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn copy_object<'life0, 'async_trait>(
        &'life0 mut self,
        src: ObjectId,
        dest: ObjectId,
    ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn move_object<'life0, 'async_trait>(
        &'life0 mut self,
        src: ObjectId,
        dest: ObjectId,
    ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn create_container<'life0, 'async_trait>( &'life0 mut self, name: ContainerName, ) -> Pin<Box<dyn Future<Output = Result<Result<Resource<Container>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

creates a new empty container

source

fn get_container<'life0, 'async_trait>( &'life0 mut self, name: ContainerName, ) -> Pin<Box<dyn Future<Output = Result<Result<Resource<Container>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

retrieves a container by name

source

fn delete_container<'life0, 'async_trait>( &'life0 mut self, name: ContainerName, ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

deletes a container and all objects within it

source

fn container_exists<'life0, 'async_trait>( &'life0 mut self, name: ContainerName, ) -> Pin<Box<dyn Future<Output = Result<Result<bool, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

returns true if the container exists

source

fn copy_object<'life0, 'async_trait>( &'life0 mut self, src: ObjectId, dest: ObjectId, ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

copies (duplicates) an object, to the same or a different container. returns an error if the target container does not exist. overwrites destination object if it already existed.

source

fn move_object<'life0, 'async_trait>( &'life0 mut self, src: ObjectId, dest: ObjectId, ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

moves or renames an object, to the same or a different container returns an error if the destination container does not exist. overwrites destination object if it already existed.

Implementations on Foreign Types§

source§

impl<_T: Host + ?Sized + Send> Host for &mut _T

source§

fn create_container<'life0, 'async_trait>( &'life0 mut self, name: ContainerName, ) -> Pin<Box<dyn Future<Output = Result<Result<Resource<Container>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

creates a new empty container

source§

fn get_container<'life0, 'async_trait>( &'life0 mut self, name: ContainerName, ) -> Pin<Box<dyn Future<Output = Result<Result<Resource<Container>, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

retrieves a container by name

source§

fn delete_container<'life0, 'async_trait>( &'life0 mut self, name: ContainerName, ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

deletes a container and all objects within it

source§

fn container_exists<'life0, 'async_trait>( &'life0 mut self, name: ContainerName, ) -> Pin<Box<dyn Future<Output = Result<Result<bool, Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

returns true if the container exists

source§

fn copy_object<'life0, 'async_trait>( &'life0 mut self, src: ObjectId, dest: ObjectId, ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

copies (duplicates) an object, to the same or a different container. returns an error if the target container does not exist. overwrites destination object if it already existed.

source§

fn move_object<'life0, 'async_trait>( &'life0 mut self, src: ObjectId, dest: ObjectId, ) -> Pin<Box<dyn Future<Output = Result<Result<(), Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

moves or renames an object, to the same or a different container returns an error if the destination container does not exist. overwrites destination object if it already existed.

Implementors§