Skip to main content

ObjectClient

Trait ObjectClient 

Source
pub trait ObjectClient: Send + Sync {
    // Required methods
    fn has_object(&self, key: &[u8]) -> Result<bool>;
    fn put_object(&self, key: &[u8], data: &[&[u8]]) -> Result<()>;
    fn get_object(&self, key: &[u8], data: &mut [&mut [u8]]) -> Result<()>;
}
Expand description

Low-level object storage client trait.

Required Methods§

Source

fn has_object(&self, key: &[u8]) -> Result<bool>

Check if an object exists.

Source

fn put_object(&self, key: &[u8], data: &[&[u8]]) -> Result<()>

Put an object.

Source

fn get_object(&self, key: &[u8], data: &mut [&mut [u8]]) -> Result<()>

Get an object.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§