pub struct ReceiveLimits {
pub max_bytes: usize,
pub max_depth: usize,
pub max_elements: usize,
pub max_string_bytes: usize,
pub accept_computed: bool,
}Expand description
A receiver’s admission-control budget — the limits it will accept from a sender, so a malicious or
buggy peer cannot exhaust the receiver’s memory, stack, or CPU. Enforced DURING decode, BEFORE the
offending allocation or recursion happens, so an over-budget message is refused cleanly (the decode
returns None) rather than processed. A receiver advertises these in the capability handshake so a
cooperative sender stays within them; an uncooperative one is still bounded by the enforcement.
Fields§
§max_bytes: usizeLargest message body (post-decompress framing aside) the receiver will decode, in bytes.
max_depth: usizeMaximum container-nesting depth. Bounds decode RECURSION, so a deeply-nested but byte-small message cannot overflow the receiver’s stack (a remote crash).
max_elements: usizeMaximum element count for any single decoded collection (list / map / set / struct-list / numeric column). A claimed count above this is refused before the elements are read.
max_string_bytes: usizeMaximum byte length of any single decoded string.
accept_computed: boolWhether to accept a SHIPPED computation (T_FUNC) at all. When false, a computed send is
refused at decode — independent of (and prior to) the C2 acceptance contract that gates whether
an accepted computation may be EVALUATED.
Trait Implementations§
Source§impl Clone for ReceiveLimits
impl Clone for ReceiveLimits
Source§fn clone(&self) -> ReceiveLimits
fn clone(&self) -> ReceiveLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReceiveLimits
impl Debug for ReceiveLimits
Source§impl Default for ReceiveLimits
impl Default for ReceiveLimits
Source§impl PartialEq for ReceiveLimits
impl PartialEq for ReceiveLimits
Source§fn eq(&self, other: &ReceiveLimits) -> bool
fn eq(&self, other: &ReceiveLimits) -> bool
self and other values to be equal, and is used by ==.impl Copy for ReceiveLimits
impl Eq for ReceiveLimits
impl StructuralPartialEq for ReceiveLimits
Auto Trait Implementations§
impl Freeze for ReceiveLimits
impl RefUnwindSafe for ReceiveLimits
impl Send for ReceiveLimits
impl Sync for ReceiveLimits
impl Unpin for ReceiveLimits
impl UnsafeUnpin for ReceiveLimits
impl UnwindSafe for ReceiveLimits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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<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.