Skip to main content

DispatchLimits

Struct DispatchLimits 

Source
pub struct DispatchLimits {
    pub incoming: QueueLimit,
    pub message_subscriptions: usize,
    pub message_deliveries: usize,
    pub message_callback_workers: usize,
    pub state_subscriptions: usize,
    pub state_callback_workers: usize,
    pub event_subscriptions: usize,
    pub event_callback_workers: usize,
    pub task_subscriptions: usize,
    pub task_callback_workers: usize,
    pub task_events: QueueLimit,
    pub blocking_handshake_jobs: usize,
}
Expand description

Upper limit on client-shared message distribution, subscription, and callback execution resources.

Fields§

§incoming: QueueLimit

Entry and payload byte limits shared by all sessions receiving messages; unread messages from old sessions still occupy the quota.

§message_subscriptions: usize

The maximum number of message subscriptions that a client can hold at the same time.

§message_deliveries: usize

The maximum number of deliveries that can be held simultaneously when a message is distributed to subscribers; multiple recipients of the same message are counted separately.

§message_callback_workers: usize

The upper limit on the number of tasks that message callbacks can perform concurrently; worker threads are created on demand.

§state_subscriptions: usize

The maximum number of connection state subscriptions a client can hold simultaneously.

§state_callback_workers: usize

Number of worker threads to execute connection status callbacks, allowed range is 1 to 256.

§event_subscriptions: usize

The maximum number of connection event subscriptions that a client can hold simultaneously.

§event_callback_workers: usize

Number of worker threads to execute connection event callbacks, allowed range is 1 to 256.

§task_subscriptions: usize

The upper limit of the number of task final event subscriptions that the client can hold at the same time.

§task_callback_workers: usize

The number of worker threads that execute task final event callbacks. The allowed range is 1 to 256.

§task_events: QueueLimit

Shared limits for final-state notifications from all session tasks; quotas are reserved when a task is admitted and count both deliveries and payload bytes.

§blocking_handshake_jobs: usize

The maximum number of tasks that can be executed simultaneously on a blocking handshake context provider.

Implementations§

Source§

impl DispatchLimits

Source

pub fn validate(&self) -> Result<()>

Validates distribution quotas and callback worker counts.

Trait Implementations§

Source§

impl Clone for DispatchLimits

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DispatchLimits

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DispatchLimits

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more