pub struct FailureClient<Client: ObjectClient, State, GetWrapperState> {
pub client: Client,
pub state: Mutex<State>,
pub get_object_cb: fn(_: &mut State, _: &str, _: &str, _: Option<Range<u64>>, _: Option<ETag>) -> Result<FailureGetWrapper<Client, GetWrapperState>, ObjectClientError<GetObjectError, Client::ClientError>>,
pub head_object_cb: fn(_: &mut State, _: &str, _: &str) -> Result<(), ObjectClientError<HeadObjectError, Client::ClientError>>,
pub list_objects_cb: fn(_: &mut State, _: &str, _: Option<&str>, _: &str, _: usize, _: &str) -> Result<(), ObjectClientError<ListObjectsError, Client::ClientError>>,
}Fields§
§client: Client§state: Mutex<State>§get_object_cb: fn(_: &mut State, _: &str, _: &str, _: Option<Range<u64>>, _: Option<ETag>) -> Result<FailureGetWrapper<Client, GetWrapperState>, ObjectClientError<GetObjectError, Client::ClientError>>§head_object_cb: fn(_: &mut State, _: &str, _: &str) -> Result<(), ObjectClientError<HeadObjectError, Client::ClientError>>§list_objects_cb: fn(_: &mut State, _: &str, _: Option<&str>, _: &str, _: usize, _: &str) -> Result<(), ObjectClientError<ListObjectsError, Client::ClientError>>Trait Implementations§
source§impl<Client, State, GetWrapperState> ObjectClient for FailureClient<Client, State, GetWrapperState>where
Client: ObjectClient + Send + Sync + 'static,
State: Send + Sync + 'static,
GetWrapperState: Send + Sync + 'static,
impl<Client, State, GetWrapperState> ObjectClient for FailureClient<Client, State, GetWrapperState>where Client: ObjectClient + Send + Sync + 'static, State: Send + Sync + 'static, GetWrapperState: Send + Sync + 'static,
type GetObjectResult = FailureGetResult<Client, GetWrapperState>
type ClientError = <Client as ObjectClient>::ClientError
source§fn delete_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = ObjectClientResult<DeleteObjectResult, DeleteObjectError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str ) -> Pin<Box<dyn Future<Output = ObjectClientResult<DeleteObjectResult, DeleteObjectError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Delete a single object from the object store. Read more
source§fn get_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
range: Option<Range<u64>>,
if_match: Option<ETag>
) -> Pin<Box<dyn Future<Output = ObjectClientResult<Self::GetObjectResult, GetObjectError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str, range: Option<Range<u64>>, if_match: Option<ETag> ) -> Pin<Box<dyn Future<Output = ObjectClientResult<Self::GetObjectResult, GetObjectError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Get an object from the object store. Returns a stream of body parts of the object. Parts are
guaranteed to be returned by the stream in order and contiguously.
source§fn list_objects<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
continuation_token: Option<&'life2 str>,
delimiter: &'life3 str,
max_keys: usize,
prefix: &'life4 str
) -> Pin<Box<dyn Future<Output = ObjectClientResult<ListObjectsResult, ListObjectsError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn list_objects<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, bucket: &'life1 str, continuation_token: Option<&'life2 str>, delimiter: &'life3 str, max_keys: usize, prefix: &'life4 str ) -> Pin<Box<dyn Future<Output = ObjectClientResult<ListObjectsResult, ListObjectsError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,
List the objects in a bucket under a given prefix
source§fn head_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str
) -> Pin<Box<dyn Future<Output = ObjectClientResult<HeadObjectResult, HeadObjectError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn head_object<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str ) -> Pin<Box<dyn Future<Output = ObjectClientResult<HeadObjectResult, HeadObjectError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Retrieve object metadata without retrieving the object contents
source§fn put_object<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
params: &'life3 PutObjectParams,
contents: impl 'async_trait + Stream<Item = impl 'async_trait + AsRef<[u8]> + Send> + Send
) -> Pin<Box<dyn Future<Output = ObjectClientResult<PutObjectResult, PutObjectError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn put_object<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str, params: &'life3 PutObjectParams, contents: impl 'async_trait + Stream<Item = impl 'async_trait + AsRef<[u8]> + Send> + Send ) -> Pin<Box<dyn Future<Output = ObjectClientResult<PutObjectResult, PutObjectError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Put an object into the object store.
The contents are provided by the client as an async stream of buffers.
source§fn get_object_attributes<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
bucket: &'life1 str,
key: &'life2 str,
max_parts: Option<usize>,
part_number_marker: Option<usize>,
object_attributes: &'life3 [ObjectAttribute]
) -> Pin<Box<dyn Future<Output = ObjectClientResult<GetObjectAttributesResult, GetObjectAttributesError, Self::ClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_object_attributes<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, bucket: &'life1 str, key: &'life2 str, max_parts: Option<usize>, part_number_marker: Option<usize>, object_attributes: &'life3 [ObjectAttribute] ) -> Pin<Box<dyn Future<Output = ObjectClientResult<GetObjectAttributesResult, GetObjectAttributesError, Self::ClientError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Retrieves all the metadata from an object without returning the object contents.
Auto Trait Implementations§
impl<Client, State, GetWrapperState> RefUnwindSafe for FailureClient<Client, State, GetWrapperState>where Client: RefUnwindSafe,
impl<Client, State, GetWrapperState> Send for FailureClient<Client, State, GetWrapperState>where Client: Send, State: Send,
impl<Client, State, GetWrapperState> Sync for FailureClient<Client, State, GetWrapperState>where Client: Sync, State: Send,
impl<Client, State, GetWrapperState> Unpin for FailureClient<Client, State, GetWrapperState>where Client: Unpin, State: Unpin,
impl<Client, State, GetWrapperState> UnwindSafe for FailureClient<Client, State, GetWrapperState>where Client: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more