pub struct ObjectStoreClient { /* private fields */ }Expand description
The single concrete ObjectOps implementation.
It wraps any object_store::ObjectStore handle, for example a handle from
build_object_store, or an
object_store::memory::InMemory handle in tests.
Implementations§
Trait Implementations§
Source§impl Clone for ObjectStoreClient
impl Clone for ObjectStoreClient
Source§fn clone(&self) -> ObjectStoreClient
fn clone(&self) -> ObjectStoreClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ObjectOps for ObjectStoreClient
impl ObjectOps for ObjectStoreClient
Source§fn put_from_path<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 Path,
src: &'life2 Path,
threshold: u64,
chunk_size: usize,
req: PutRequest,
) -> Pin<Box<dyn Future<Output = Result<PutOutcome, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_from_path<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 Path,
src: &'life2 Path,
threshold: u64,
chunk_size: usize,
req: PutRequest,
) -> Pin<Box<dyn Future<Output = Result<PutOutcome, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Upload a local file. The method uses single-PUT below
threshold
bytes, and streaming multipart in chunk_size parts at or above
threshold.Source§fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
bytes: Bytes,
req: PutRequest,
) -> Pin<Box<dyn Future<Output = Result<PutOutcome, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
bytes: Bytes,
req: PutRequest,
) -> Pin<Box<dyn Future<Output = Result<PutOutcome, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Single-PUT an in-memory payload under the preconditions in
req.Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a whole object.
Source§fn get_capped<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
max_bytes: u64,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_capped<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
max_bytes: u64,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a whole object with a byte limit enforced before buffering its body. Read more
Source§fn get_range<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
range: GetRange,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_range<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
range: GetRange,
) -> Pin<Box<dyn Future<Output = Result<Bytes, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a byte range of an object.
Source§fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn head<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<ObjectMeta, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch object metadata, such as the size and the etag.
Source§fn list<'life0, 'async_trait>(
&'life0 self,
prefix: Option<Path>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ObjectMeta>, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
prefix: Option<Path>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ObjectMeta>, ObjectStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List objects under an optional prefix, collecting the whole listing. Read more
Source§fn list_stream(
&self,
prefix: Option<Path>,
) -> BoxStream<'static, Result<ObjectMeta, ObjectStoreError>>
fn list_stream( &self, prefix: Option<Path>, ) -> BoxStream<'static, Result<ObjectMeta, ObjectStoreError>>
List objects under an optional prefix as a stream, one object at a
time, so a caller never holds the whole listing at once.
Auto Trait Implementations§
impl !RefUnwindSafe for ObjectStoreClient
impl !UnwindSafe for ObjectStoreClient
impl Freeze for ObjectStoreClient
impl Send for ObjectStoreClient
impl Sync for ObjectStoreClient
impl Unpin for ObjectStoreClient
impl UnsafeUnpin for ObjectStoreClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more