#[non_exhaustive]pub struct DecisionLedgerConfig {
pub max_pending: usize,
pub max_completed: usize,
pub max_context_bytes: usize,
pub max_action_bytes: usize,
}Expand description
Capacity limits for a DecisionLedger.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_pending: usizeMaximum number of incomplete decisions. They are never auto-evicted.
max_completed: usizeMaximum number of completed tombstones. They are never auto-evicted.
max_context_bytes: usizeMaximum bounded-size estimate for one context.
max_action_bytes: usizeMaximum bounded-size estimate for one action.
Implementations§
Source§impl DecisionLedgerConfig
impl DecisionLedgerConfig
Sourcepub fn new(
max_pending: usize,
max_completed: usize,
) -> Result<Self, DecisionLedgerError>
pub fn new( max_pending: usize, max_completed: usize, ) -> Result<Self, DecisionLedgerError>
Build explicit pending/completed bounds.
Sourcepub fn with_value_limits(
self,
max_context_bytes: usize,
max_action_bytes: usize,
) -> Result<Self, DecisionLedgerError>
pub fn with_value_limits( self, max_context_bytes: usize, max_action_bytes: usize, ) -> Result<Self, DecisionLedgerError>
Override per-entry context/action byte bounds.
Trait Implementations§
Source§impl Clone for DecisionLedgerConfig
impl Clone for DecisionLedgerConfig
Source§fn clone(&self) -> DecisionLedgerConfig
fn clone(&self) -> DecisionLedgerConfig
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 DecisionLedgerConfig
Source§impl Debug for DecisionLedgerConfig
impl Debug for DecisionLedgerConfig
Source§impl Default for DecisionLedgerConfig
impl Default for DecisionLedgerConfig
impl Eq for DecisionLedgerConfig
Source§impl PartialEq for DecisionLedgerConfig
impl PartialEq for DecisionLedgerConfig
impl StructuralPartialEq for DecisionLedgerConfig
Auto Trait Implementations§
impl Freeze for DecisionLedgerConfig
impl RefUnwindSafe for DecisionLedgerConfig
impl Send for DecisionLedgerConfig
impl Sync for DecisionLedgerConfig
impl Unpin for DecisionLedgerConfig
impl UnsafeUnpin for DecisionLedgerConfig
impl UnwindSafe for DecisionLedgerConfig
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