pub struct DispatchLimits {
pub max_depth: usize,
pub max_actions: usize,
}Expand description
Configurable limits for middleware dispatch.
Both limits should be at least 1 for dispatch to make progress.
If either value is 0, all dispatch attempts fail with DispatchError.
Fields§
§max_depth: usizeMaximum nested dispatch depth from middleware injection.
max_actions: usizeMaximum attempted actions during a single top-level dispatch.
This includes actions cancelled by Middleware::before.
Trait Implementations§
Source§impl Clone for DispatchLimits
impl Clone for DispatchLimits
Source§fn clone(&self) -> DispatchLimits
fn clone(&self) -> DispatchLimits
Returns a duplicate 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 Debug for DispatchLimits
impl Debug for DispatchLimits
Source§impl Default for DispatchLimits
impl Default for DispatchLimits
Source§impl PartialEq for DispatchLimits
impl PartialEq for DispatchLimits
impl Copy for DispatchLimits
impl Eq for DispatchLimits
impl StructuralPartialEq for DispatchLimits
Auto Trait Implementations§
impl Freeze for DispatchLimits
impl RefUnwindSafe for DispatchLimits
impl Send for DispatchLimits
impl Sync for DispatchLimits
impl Unpin for DispatchLimits
impl UnsafeUnpin for DispatchLimits
impl UnwindSafe for DispatchLimits
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§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
Compare self to
key and return true if they are equal.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