pub struct SessionKvLimits {
pub max_session_bytes: u64,
pub max_value_bytes: u64,
pub max_entries: u64,
pub max_key_units: u64,
}Fields§
§max_session_bytes: u64§max_value_bytes: u64§max_entries: u64§max_key_units: u64Implementations§
Source§impl SessionKvLimits
The checks every store applies, in one place so a durable store refuses
exactly what the in-memory one does.
impl SessionKvLimits
The checks every store applies, in one place so a durable store refuses exactly what the in-memory one does.
pub fn check_key( &self, operation: &'static str, key: &[u16], ) -> Result<(), SessionKvError>
Sourcepub fn check_write(
&self,
key: &[u16],
payload: &[u16],
) -> Result<(), SessionKvError>
pub fn check_write( &self, key: &[u16], payload: &[u16], ) -> Result<(), SessionKvError>
The key and value checks set makes before looking at what the session
holds.
Sourcepub fn check_capacity(
&self,
key: &[u16],
payload: &[u16],
held: SessionKvUsage,
) -> Result<u64, SessionKvError>
pub fn check_capacity( &self, key: &[u16], payload: &[u16], held: SessionKvUsage, ) -> Result<u64, SessionKvError>
Whether set fits beside what the session already holds. The count
bound only gates a new key. Returns the session’s retained bytes after
the write.
Trait Implementations§
Source§impl Clone for SessionKvLimits
impl Clone for SessionKvLimits
impl Copy for SessionKvLimits
Source§impl Debug for SessionKvLimits
impl Debug for SessionKvLimits
Source§impl Default for SessionKvLimits
impl Default for SessionKvLimits
impl Eq for SessionKvLimits
Source§impl PartialEq for SessionKvLimits
impl PartialEq for SessionKvLimits
impl StructuralPartialEq for SessionKvLimits
Auto Trait Implementations§
impl Freeze for SessionKvLimits
impl RefUnwindSafe for SessionKvLimits
impl Send for SessionKvLimits
impl Sync for SessionKvLimits
impl Unpin for SessionKvLimits
impl UnsafeUnpin for SessionKvLimits
impl UnwindSafe for SessionKvLimits
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.