pub struct FaultyObjectStore { /* private fields */ }Expand description
Object store middleware with runtime-flippable fault injection.
Implementations§
Source§impl FaultyObjectStore
impl FaultyObjectStore
Sourcepub fn fault(&self) -> ObjectStoreFault
pub fn fault(&self) -> ObjectStoreFault
Current fault mode.
Sourcepub fn set_fault(&self, mode: ObjectStoreFault)
pub fn set_fault(&self, mode: ObjectStoreFault)
Switch fault mode. Takes effect on the next operation.
Trait Implementations§
Source§impl Debug for FaultyObjectStore
impl Debug for FaultyObjectStore
Source§impl Display for FaultyObjectStore
impl Display for FaultyObjectStore
Source§impl ObjectStore for FaultyObjectStore
impl ObjectStore for FaultyObjectStore
Source§fn put_opts<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 OsPath,
payload: PutPayload,
opts: PutOptions,
) -> Pin<Box<dyn Future<Output = Result<PutResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_opts<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 OsPath,
payload: PutPayload,
opts: PutOptions,
) -> Pin<Box<dyn Future<Output = Result<PutResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn put_multipart_opts<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 OsPath,
opts: PutMultipartOptions,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MultipartUpload>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_multipart_opts<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 OsPath,
opts: PutMultipartOptions,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MultipartUpload>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Perform a multipart upload with options Read more
Source§fn get_opts<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 OsPath,
options: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GetResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_opts<'life0, 'life1, 'async_trait>(
&'life0 self,
location: &'life1 OsPath,
options: GetOptions,
) -> Pin<Box<dyn Future<Output = Result<GetResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Perform a get request with options Read more
Source§fn delete_stream(
&self,
locations: BoxStream<'static, Result<OsPath>>,
) -> BoxStream<'static, Result<OsPath>>
fn delete_stream( &self, locations: BoxStream<'static, Result<OsPath>>, ) -> BoxStream<'static, Result<OsPath>>
Delete all the objects at the specified locations Read more
Source§fn list(
&self,
prefix: Option<&OsPath>,
) -> BoxStream<'static, Result<ObjectMeta>>
fn list( &self, prefix: Option<&OsPath>, ) -> BoxStream<'static, Result<ObjectMeta>>
List all the objects with the given prefix. Read more
Source§fn list_with_delimiter<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 OsPath>,
) -> Pin<Box<dyn Future<Output = Result<ListResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_with_delimiter<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 OsPath>,
) -> Pin<Box<dyn Future<Output = Result<ListResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List objects with the given prefix and an implementation specific
delimiter. Returns common prefixes (directories) in addition to object
metadata. Read more
Source§fn copy_opts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 OsPath,
to: &'life2 OsPath,
options: CopyOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn copy_opts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 OsPath,
to: &'life2 OsPath,
options: CopyOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Copy an object from one path to another in the same object store.
§fn get_ranges<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
location: &'life1 Path,
ranges: &'life2 [Range<u64>],
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn get_ranges<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
location: &'life1 Path,
ranges: &'life2 [Range<u64>],
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Return the bytes that are stored at the specified location
in the given byte ranges
§fn list_with_offset(
&self,
prefix: Option<&Path>,
offset: &Path,
) -> Pin<Box<dyn Stream<Item = Result<ObjectMeta, Error>> + Send>>
fn list_with_offset( &self, prefix: Option<&Path>, offset: &Path, ) -> Pin<Box<dyn Stream<Item = Result<ObjectMeta, Error>> + Send>>
List all the objects with the given prefix and a location greater than
offset Read more§fn rename_opts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 Path,
to: &'life2 Path,
options: RenameOptions,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn rename_opts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 Path,
to: &'life2 Path,
options: RenameOptions,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Move an object from one path to another in the same object store. Read more
Auto Trait Implementations§
impl !Freeze for FaultyObjectStore
impl !RefUnwindSafe for FaultyObjectStore
impl Send for FaultyObjectStore
impl Sync for FaultyObjectStore
impl Unpin for FaultyObjectStore
impl UnsafeUnpin for FaultyObjectStore
impl !UnwindSafe for FaultyObjectStore
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> 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> 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> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> ObjectStoreExt for Twhere
T: ObjectStore + ?Sized,
impl<T> ObjectStoreExt for Twhere
T: ObjectStore + ?Sized,
§async fn put(
&self,
location: &Path,
payload: PutPayload,
) -> Result<PutResult, Error>
async fn put( &self, location: &Path, payload: PutPayload, ) -> Result<PutResult, Error>
Save the provided bytes to the specified location Read more
§async fn put_multipart(
&self,
location: &Path,
) -> Result<Box<dyn MultipartUpload>, Error>
async fn put_multipart( &self, location: &Path, ) -> Result<Box<dyn MultipartUpload>, Error>
Perform a multipart upload Read more
§async fn get(&self, location: &Path) -> Result<GetResult, Error>
async fn get(&self, location: &Path) -> Result<GetResult, Error>
Return the bytes that are stored at the specified location. Read more
§async fn get_range(
&self,
location: &Path,
range: Range<u64>,
) -> Result<Bytes, Error>
async fn get_range( &self, location: &Path, range: Range<u64>, ) -> Result<Bytes, Error>
Return the bytes that are stored at the specified location
in the given byte range. Read more
§async fn head(&self, location: &Path) -> Result<ObjectMeta, Error>
async fn head(&self, location: &Path) -> Result<ObjectMeta, Error>
Return the metadata for the specified location
§async fn delete(&self, location: &Path) -> Result<(), Error>
async fn delete(&self, location: &Path) -> Result<(), Error>
Delete the object at the specified location.
§async fn copy(&self, from: &Path, to: &Path) -> Result<(), Error>
async fn copy(&self, from: &Path, to: &Path) -> Result<(), Error>
Copy an object from one path to another in the same object store. Read more
§async fn copy_if_not_exists(&self, from: &Path, to: &Path) -> Result<(), Error>
async fn copy_if_not_exists(&self, from: &Path, to: &Path) -> Result<(), Error>
Copy an object from one path to another, only if destination is empty. Read more
§async fn rename(&self, from: &Path, to: &Path) -> Result<(), Error>
async fn rename(&self, from: &Path, to: &Path) -> Result<(), Error>
Move an object from one path to another in the same object store. Read more
§async fn rename_if_not_exists(
&self,
from: &Path,
to: &Path,
) -> Result<(), Error>
async fn rename_if_not_exists( &self, from: &Path, to: &Path, ) -> Result<(), Error>
Move an object from one path to another in the same object store. Read more
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Scope for T
impl<T> Scope for T
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.