pub struct Limits {
pub max_depth: usize,
pub max_nodes: usize,
pub max_contexts: usize,
pub max_terms: usize,
}Expand description
Ceilings on the work one document may cause.
A document arrives from anyone who can reach an inbox, and every one of these bounds an amount of work that is otherwise a function of what the sender wrote. The defaults are generous for real traffic: the largest Mastodon actor observed uses a depth of 5 and some 60 nodes.
Fields§
§max_depth: usizeHow deeply values may nest. Matches Fedify’s traversal limit.
max_nodes: usizeHow many JSON objects one document may contain.
max_contexts: usizeHow many @context entries one document may cause to be processed,
counting each element of every array and each bundled document reached.
max_terms: usizeHow many terms one active context may define.
Trait Implementations§
impl Copy for Limits
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