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 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 From<StalledStreamProtectionConfig> for Builder
impl From<StalledStreamProtectionConfig> for Builder
Source§fn from(config: StalledStreamProtectionConfig) -> Self
fn from(config: StalledStreamProtectionConfig) -> Self
Converts to this type from the input type.
Source§impl Storable for StalledStreamProtectionConfig
impl Storable for StalledStreamProtectionConfig
Source§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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.