pub enum ObjectStoreEnum<InMem, Opendal, S3> {
InMem(InMem),
Opendal(Opendal),
S3(S3),
}
Variants§
Implementations§
source§impl ObjectStoreEnum<MonitoredStreamingUploader<<InMemObjectStore as ObjectStore>::StreamingUploader>, MonitoredStreamingUploader<<OpendalObjectStore as ObjectStore>::StreamingUploader>, MonitoredStreamingUploader<<S3ObjectStore as ObjectStore>::StreamingUploader>>
impl ObjectStoreEnum<MonitoredStreamingUploader<<InMemObjectStore as ObjectStore>::StreamingUploader>, MonitoredStreamingUploader<<OpendalObjectStore as ObjectStore>::StreamingUploader>, MonitoredStreamingUploader<<S3ObjectStore as ObjectStore>::StreamingUploader>>
pub async fn write_bytes(&mut self, data: Bytes) -> ObjectResult<()>
pub async fn finish(self) -> ObjectResult<()>
pub fn get_memory_usage(&self) -> u64
source§impl ObjectStoreEnum<MonitoredObjectStore<InMemObjectStore>, MonitoredObjectStore<OpendalObjectStore>, MonitoredObjectStore<S3ObjectStore>>
impl ObjectStoreEnum<MonitoredObjectStore<InMemObjectStore>, MonitoredObjectStore<OpendalObjectStore>, MonitoredObjectStore<S3ObjectStore>>
pub async fn upload(&self, path: &str, obj: Bytes) -> ObjectResult<()>
pub async fn streaming_upload( &self, path: &str, ) -> ObjectResult<ObjectStreamingUploader>
pub async fn read( &self, path: &str, range: impl ObjectRangeBounds, ) -> ObjectResult<Bytes>
pub async fn metadata(&self, path: &str) -> ObjectResult<ObjectMetadata>
sourcepub async fn streaming_read(
&self,
path: &str,
start_loc: Range<usize>,
) -> ObjectResult<MonitoredStreamingReader>
pub async fn streaming_read( &self, path: &str, start_loc: Range<usize>, ) -> ObjectResult<MonitoredStreamingReader>
Returns a stream reading the object specified in path
. If given, the stream starts at the
byte with index start_pos
(0-based). As far as possible, the stream only loads the amount
of data into memory that is read from the stream.
pub async fn delete(&self, path: &str) -> ObjectResult<()>
sourcepub async fn delete_objects(&self, paths: &[String]) -> ObjectResult<()>
pub async fn delete_objects(&self, paths: &[String]) -> ObjectResult<()>
Deletes the objects with the given paths permanently from the storage. If an object specified in the request is not found, it will be considered as successfully deleted.
If a hybrid storage is used, the method will first attempt to delete objects in local storage. Only if that is successful, it will remove objects from remote storage.
pub async fn list( &self, prefix: &str, start_after: Option<String>, limit: Option<usize>, ) -> ObjectResult<ObjectMetadataIter>
pub fn get_object_prefix( &self, obj_id: u64, use_new_object_prefix_strategy: bool, ) -> String
pub fn support_streaming_upload(&self) -> bool
pub fn media_type(&self) -> &'static str
Auto Trait Implementations§
impl<InMem, Opendal, S3> Freeze for ObjectStoreEnum<InMem, Opendal, S3>
impl<InMem, Opendal, S3> RefUnwindSafe for ObjectStoreEnum<InMem, Opendal, S3>
impl<InMem, Opendal, S3> Send for ObjectStoreEnum<InMem, Opendal, S3>
impl<InMem, Opendal, S3> Sync for ObjectStoreEnum<InMem, Opendal, S3>
impl<InMem, Opendal, S3> Unpin for ObjectStoreEnum<InMem, Opendal, S3>
impl<InMem, Opendal, S3> UnwindSafe for ObjectStoreEnum<InMem, Opendal, S3>
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Creates a shared type from an unshared type.
source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level
.source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
.source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
with metric_level
set to
MetricLevel::Debug
and relabel_num
set to 1.