pub struct SessionLimits {
pub max_regions_per_batch: u16,
pub max_region_bytes: u64,
pub max_batch_bytes: u64,
pub max_active_regions: u32,
pub max_active_bytes: u64,
pub max_transactions: u64,
pub max_bootstrap_payload_bytes: u32,
pub max_control_payload_bytes: u32,
}Expand description
Finite resource limits offered and negotiated by both endpoints.
Fields§
§max_regions_per_batch: u16Maximum entries in one batch; hard maximum sixteen.
max_region_bytes: u64Maximum logical bytes in one region.
max_batch_bytes: u64Maximum aggregate logical/mapped bytes in one batch.
max_active_regions: u32Maximum charged active region mappings.
max_active_bytes: u64Maximum charged active mapping bytes.
max_transactions: u64Maximum monotonically increasing transactions.
max_bootstrap_payload_bytes: u32Maximum opaque HELLO application payload bytes.
max_control_payload_bytes: u32Maximum opaque application-control payload bytes.
Implementations§
Source§impl SessionLimits
impl SessionLimits
Sourcepub fn validate(self) -> Result<Self, NegotiationError>
pub fn validate(self) -> Result<Self, NegotiationError>
Validates every field before allocation or native import.
Sourcepub fn negotiate(local: Self, peer: Self) -> Result<Self, NegotiationError>
pub fn negotiate(local: Self, peer: Self) -> Result<Self, NegotiationError>
Computes checked effective minima after validating both offers.
Trait Implementations§
Source§impl Clone for SessionLimits
impl Clone for SessionLimits
Source§fn clone(&self) -> SessionLimits
fn clone(&self) -> SessionLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SessionLimits
Source§impl Debug for SessionLimits
impl Debug for SessionLimits
Source§impl Default for SessionLimits
impl Default for SessionLimits
impl Eq for SessionLimits
Source§impl PartialEq for SessionLimits
impl PartialEq for SessionLimits
impl StructuralPartialEq for SessionLimits
Auto Trait Implementations§
impl Freeze for SessionLimits
impl RefUnwindSafe for SessionLimits
impl Send for SessionLimits
impl Sync for SessionLimits
impl Unpin for SessionLimits
impl UnsafeUnpin for SessionLimits
impl UnwindSafe for SessionLimits
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