Skip to main content

Faults

Struct Faults 

Source
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: usize

Fail this many calls before doing their work.

§refuse_file_uploads: usize

Refuse 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: usize

Panic 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: usize

Maximum 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: StorageFailure

The 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: Duration

Delay each call without blocking its executor.

§drop_part: bool

Drop the next part before it is stored.

§lose_part_reply: bool

Store the next part, but lose the reply before advancing the caller’s session.

§lose_initiation_reply: bool

Start 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: bool

Publish the next upload but lose the completion reply.

§abort_failures: usize

Refuse this many upload aborts, retaining the pending bytes.

§expire_uploads: bool

Expire all pending sessions before the next call.

§overwrite_create: bool

Accept creates at occupied paths, violating the provider contract.

§hide_listings: bool

Hide 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: bool

Refuse a duplicate create but fail to abort its upload session.

§refuse_after_storing: usize

Store 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: usize

Refuse 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§

Source§

impl Faults

Source

pub fn none() -> Self

No failures or delays.

Trait Implementations§

Source§

impl Clone for Faults

Source§

fn clone(&self) -> Faults

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,