pub struct Limits {
pub max_entries: Option<usize>,
pub max_text_preview: Option<usize>,
pub max_image_preview: Option<u64>,
pub max_pdf_preview: Option<u64>,
pub max_send: Option<u64>,
}Expand description
The limits of one call. The app passes what it needs (None keeps the kit default); a value above the hard ceiling is
lowered to it, and a zero is raised to one, so no call is unbounded or empty.
| limit | default | ceiling |
|---|---|---|
max_entries | 2 000 | 20 000 |
max_text_preview (bytes) | 64 KiB | 1 MiB |
max_image_preview (bytes) | 5 MiB | 25 MiB |
max_pdf_preview (bytes) | 12 MiB | 50 MiB |
max_send (bytes) | 50 MiB | 200 MiB |
Fields§
§max_entries: Option<usize>§max_text_preview: Option<usize>§max_image_preview: Option<u64>§max_pdf_preview: Option<u64>§max_send: Option<u64>Implementations§
Source§impl Limits
impl Limits
Sourcepub fn text_preview(&self) -> usize
pub fn text_preview(&self) -> usize
Most bytes of a text file a preview reads.
Sourcepub fn image_preview(&self) -> u64
pub fn image_preview(&self) -> u64
Largest image a preview embeds.
Sourcepub fn pdf_preview(&self) -> u64
pub fn pdf_preview(&self) -> u64
Largest PDF a preview embeds.
Trait Implementations§
impl Copy for Limits
Source§impl<'de> Deserialize<'de> for Limits
impl<'de> Deserialize<'de> for Limits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze 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
Mutably borrows from an owned value. Read more