pub struct Faults {Show 29 fields
pub fail_next: usize,
pub refuse_file_uploads: usize,
pub panic_file_uploads: usize,
pub read_panics: BTreeSet<ObjectPath>,
pub read_failures: BTreeMap<ObjectPath, StorageFailure>,
pub status_failures: BTreeMap<ObjectPath, StorageFailure>,
pub delete_failures: BTreeMap<ObjectPath, StorageFailure>,
pub create_failures: BTreeMap<ObjectPath, (StorageFailure, u16)>,
pub list_failures: BTreeMap<ObjectPrefix, StorageFailure>,
pub read_chunk_size: usize,
pub body_failures: BTreeMap<ObjectPath, BodyFailure>,
pub garbled_reads: BTreeMap<ObjectPath, Garble>,
pub failure: StorageFailure,
pub response: Option<u16>,
pub retry_after: Option<u64>,
pub delay: Duration,
pub drop_part: bool,
pub lose_part_reply: bool,
pub lose_initiation_reply: bool,
pub lose_completion_reply: bool,
pub abort_failures: usize,
pub expire_uploads: bool,
pub overwrite_create: bool,
pub hide_listings: bool,
pub listing_lag: Option<Duration>,
pub fail_duplicate_cleanup: bool,
pub refuse_after_storing: usize,
pub refuse_replacements: usize,
pub grant_failure: Option<StorageFailure>,
}Expand description
Faults applied to the next calls, including accepted parts with lost replies.
Fields§
§fail_next: usizeFail this many calls before doing their work.
refuse_file_uploads: usizeRefuse this many file uploads as they start, each with failure,
response and retry_after as fail_next fails a call: a file’s
single create, or the call beginning its multipart upload. Nothing is
stored. Every other call goes through, so a pass beside the upload
can’t take the fault.
panic_file_uploads: usizePanic in this many file uploads as they start, as a bug in the caller’s upload would; every other call goes through.
read_panics: BTreeSet<ObjectPath>Panic in exact reads at these paths, as a bug in the reader would.
read_failures: BTreeMap<ObjectPath, StorageFailure>Fail exact reads at these paths, retaining other in-flight responses.
status_failures: BTreeMap<ObjectPath, StorageFailure>Fail exact status calls at these paths, independently of reads.
delete_failures: BTreeMap<ObjectPath, StorageFailure>Fail exact deletions at these paths; the object stays.
create_failures: BTreeMap<ObjectPath, (StorageFailure, u16)>Refuse creates at these paths with a provider response of this HTTP status; nothing is stored.
list_failures: BTreeMap<ObjectPrefix, StorageFailure>Fail listings of exactly these prefixes.
read_chunk_size: usizeMaximum bytes returned by each body read; nonzero.
body_failures: BTreeMap<ObjectPath, BodyFailure>Failures after metadata, independently of request-start failures.
garbled_reads: BTreeMap<ObjectPath, Garble>Change one byte of responses at these paths, each response differently, as faults on the way to the device would; the stored object stays as it was.
failure: StorageFailureThe classification of injected failures.
response: Option<u16>Injected failures arrive as a provider response with this HTTP
status (E5). None, without retry_after, is a request that received
no response.
retry_after: Option<u64>Injected failures arrive as a response, a 429 unless response
names another status, asking every consumer to wait this many
seconds (Retry-After).
delay: DurationDelay each call without blocking its executor.
drop_part: boolDrop the next part before it is stored.
lose_part_reply: boolStore the next part, but lose the reply before advancing the caller’s session.
lose_initiation_reply: boolStart the next planned session’s upload, but lose the reply: the caller never learns the id of the session the provider holds.
lose_completion_reply: boolPublish the next upload but lose the completion reply.
abort_failures: usizeRefuse this many upload aborts, retaining the pending bytes.
expire_uploads: boolExpire all pending sessions before the next call.
overwrite_create: boolAccept creates at occupied paths, violating the provider contract.
hide_listings: boolHide published objects from listings while exact reads and status still see them.
listing_lag: Option<Duration>Hide objects no older than this lag; exact reads still see publication.
fail_duplicate_cleanup: boolRefuse a duplicate create but fail to abort its upload session.
refuse_after_storing: usizeStore this many creates and replacements, then answer each with a 429, as a copy publication does when its temporary’s deletion is refused after the object is published (§20.6).
refuse_replacements: usizeRefuse this many conditional replacements with Conflict although
they name the current revision, leaving the object unchanged, as
OneDrive can refuse every writer of one race.
grant_failure: Option<StorageFailure>Fail every grant of access to an account with this failure, as a provider refusing to share the store would.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Faults
impl RefUnwindSafe for Faults
impl Send for Faults
impl Sync for Faults
impl Unpin for Faults
impl UnsafeUnpin for Faults
impl UnwindSafe for Faults
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
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>
§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>
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>
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