pub struct StalledStreamProtectionConfig { /* private fields */ }
Expand description
Configuration for stalled stream protection.
When enabled, download streams that stall out will be cancelled.
Implementations§
source§impl StalledStreamProtectionConfig
impl StalledStreamProtectionConfig
sourcepub fn enabled() -> Builder
pub fn enabled() -> Builder
Create a new config that enables stalled stream protection for both uploads and downloads.
sourcepub fn disabled() -> StalledStreamProtectionConfig
pub fn disabled() -> StalledStreamProtectionConfig
Create a new config that disables stalled stream protection.
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Return whether stalled stream protection is enabled for either uploads or downloads.
sourcepub fn upload_enabled(&self) -> bool
pub fn upload_enabled(&self) -> bool
True if stalled stream protection is enabled for upload streams.
sourcepub fn download_enabled(&self) -> bool
pub fn download_enabled(&self) -> bool
True if stalled stream protection is enabled for download streams.
sourcepub fn grace_period(&self) -> Duration
pub fn grace_period(&self) -> Duration
Return the grace period for stalled stream protection.
When a stream stalls for longer than this grace period, the stream will return an error.
Trait Implementations§
source§impl Clone for StalledStreamProtectionConfig
impl Clone for StalledStreamProtectionConfig
source§fn clone(&self) -> StalledStreamProtectionConfig
fn clone(&self) -> StalledStreamProtectionConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Storable for StalledStreamProtectionConfig
impl Storable for StalledStreamProtectionConfig
§type Storer = StoreReplace<StalledStreamProtectionConfig>
type Storer = StoreReplace<StalledStreamProtectionConfig>
Specify how an item is stored in the config bag, e.g.
StoreReplace
and StoreAppend
Auto Trait Implementations§
impl Freeze for StalledStreamProtectionConfig
impl RefUnwindSafe for StalledStreamProtectionConfig
impl Send for StalledStreamProtectionConfig
impl Sync for StalledStreamProtectionConfig
impl Unpin for StalledStreamProtectionConfig
impl UnwindSafe for StalledStreamProtectionConfig
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 moreCreates a shared type from an unshared type.