pub struct ServerLimits {
pub max_upload_bytes: Option<u64>,
pub upload_idle_timeout: Option<Duration>,
pub max_concurrent_uploads: Option<usize>,
}Expand description
Server-tier upload limits. All None = unlimited (the default; preserves the
unbounded streaming behavior for operators who front boatramp with their own
limits).
Fields§
§max_upload_bytes: Option<u64>Reject a blob upload larger than this many bytes (413 on a declared
Content-Length; the stream is also aborted if it exceeds the cap while
streaming, in case the length was absent or lied).
upload_idle_timeout: Option<Duration>Abort an upload whose body stalls (no bytes) for longer than this — slowloris protection that doesn’t penalize slow-but-steady transfers.
max_concurrent_uploads: Option<usize>Cap on simultaneous in-flight blob uploads; further uploads get 503 until
a slot frees. None = unbounded.
Implementations§
Source§impl ServerLimits
impl ServerLimits
Sourcepub fn is_unlimited(&self) -> bool
pub fn is_unlimited(&self) -> bool
Whether any limit is set (so callers can skip wrapping work entirely).
Trait Implementations§
Source§impl Clone for ServerLimits
impl Clone for ServerLimits
Source§fn clone(&self) -> ServerLimits
fn clone(&self) -> ServerLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerLimits
impl Debug for ServerLimits
Source§impl Default for ServerLimits
impl Default for ServerLimits
Source§fn default() -> ServerLimits
fn default() -> ServerLimits
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServerLimits
impl RefUnwindSafe for ServerLimits
impl Send for ServerLimits
impl Sync for ServerLimits
impl Unpin for ServerLimits
impl UnsafeUnpin for ServerLimits
impl UnwindSafe for ServerLimits
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more