pub struct ProtocolIngressLimits { /* private fields */ }Expand description
Local limits for inbound messages of an RLPx subprotocol.
These limits are not advertised to the remote peer and do not affect message ID negotiation.
Implementations§
Source§impl ProtocolIngressLimits
impl ProtocolIngressLimits
Sourcepub const DEFAULT_MAX_BUFFERED_BYTES: usize
pub const DEFAULT_MAX_BUFFERED_BYTES: usize
Default byte budget for messages waiting to be polled by a protocol connection.
Sourcepub const DEFAULT_MAX_BUFFERED_MESSAGES: usize = 1024
pub const DEFAULT_MAX_BUFFERED_MESSAGES: usize = 1024
Default message budget for messages waiting to be polled by a protocol connection.
Sourcepub const fn new(max_frame_bytes: usize) -> Self
pub const fn new(max_frame_bytes: usize) -> Self
Creates limits with an explicit maximum inbound frame size.
The frame size includes the capability-local message ID byte.
§Panics
Panics if max_frame_bytes is zero.
Sourcepub const fn with_max_buffered_bytes(self, max_buffered_bytes: usize) -> Self
pub const fn with_max_buffered_bytes(self, max_buffered_bytes: usize) -> Self
Sourcepub const fn with_max_buffered_messages(
self,
max_buffered_messages: usize,
) -> Self
pub const fn with_max_buffered_messages( self, max_buffered_messages: usize, ) -> Self
Sourcepub const fn max_frame_bytes(&self) -> Option<usize>
pub const fn max_frame_bytes(&self) -> Option<usize>
Returns the explicit maximum inbound frame size, if configured.
Sourcepub const fn max_buffered_bytes(&self) -> usize
pub const fn max_buffered_bytes(&self) -> usize
Returns the maximum number of buffered frame bytes.
Sourcepub const fn max_buffered_messages(&self) -> usize
pub const fn max_buffered_messages(&self) -> usize
Returns the maximum number of buffered messages.
Trait Implementations§
Source§impl Clone for ProtocolIngressLimits
impl Clone for ProtocolIngressLimits
impl Copy for ProtocolIngressLimits
Source§impl Debug for ProtocolIngressLimits
impl Debug for ProtocolIngressLimits
Source§impl Default for ProtocolIngressLimits
impl Default for ProtocolIngressLimits
impl Eq for ProtocolIngressLimits
Source§impl PartialEq for ProtocolIngressLimits
impl PartialEq for ProtocolIngressLimits
impl StructuralPartialEq for ProtocolIngressLimits
Auto Trait Implementations§
impl Freeze for ProtocolIngressLimits
impl RefUnwindSafe for ProtocolIngressLimits
impl Send for ProtocolIngressLimits
impl Sync for ProtocolIngressLimits
impl Unpin for ProtocolIngressLimits
impl UnsafeUnpin for ProtocolIngressLimits
impl UnwindSafe for ProtocolIngressLimits
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes