pub struct Limits { /* private fields */ }Expand description
The bounds a panel holds each request to, which
Panel::limits sets. Each one keeps a request to a known size: a
request past one is refused whole, never served in part.
let panel = Panel::new("admin").limits(
Limits::default()
.export_rows(50_000)
.body_bytes(50 * 1024 * 1024),
);Implementations§
Source§impl Limits
impl Limits
Sourcepub fn export_rows(self, rows: usize) -> Self
pub fn export_rows(self, rows: usize) -> Self
The most rows a CSV export holds; a list with more answers 413 rather than a partial file. Each row the export counts is read twice, once to count and once to stream.
Sourcepub fn import_rows(self, rows: usize) -> Self
pub fn import_rows(self, rows: usize) -> Self
The most rows one CSV import creates. Every row writes in the request’s one transaction, so a longer file is refused whole.
Sourcepub fn bulk_records(self, records: usize) -> Self
pub fn bulk_records(self, records: usize) -> Self
The most records one bulk action runs on. The selection loads as one IN list, which
some databases bound: SQLite takes 32,766 values. A selection of every matching record
past it writes nothing and asks the user to narrow the list.
Sourcepub fn body_bytes(self, bytes: usize) -> Self
pub fn body_bytes(self, bytes: usize) -> Self
The most bytes a request body under the panel’s prefix holds, uploaded files included; a
larger body answers 413. A file field’s max_bytes must stay below it.
Trait Implementations§
impl Copy for Limits
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Forget for Limits
impl Freeze for Limits
impl Move for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.