pub struct InsertOutcome {
pub inserted: bool,
pub deduplicated: bool,
pub conflict: bool,
}Fields§
§inserted: boolTrue when this (request, attempt) pair was not previously recorded and the record was stored. False means a record already existed and this insert was a no-op (caller must not bill a second time).
deduplicated: boolTrue when an existing record was found and its usage exactly matched the incoming usage (idempotent re-presentation of the same attempt).
conflict: boolTrue when an existing record was found but with different token counts than the incoming usage. The caller can distinguish this from a plain dedup and treat the conflicting re-presentation as an anomaly.
Implementations§
Trait Implementations§
Source§impl Clone for InsertOutcome
impl Clone for InsertOutcome
impl Copy for InsertOutcome
Source§impl Debug for InsertOutcome
impl Debug for InsertOutcome
impl Eq for InsertOutcome
Source§impl PartialEq for InsertOutcome
impl PartialEq for InsertOutcome
impl StructuralPartialEq for InsertOutcome
Auto Trait Implementations§
impl Freeze for InsertOutcome
impl RefUnwindSafe for InsertOutcome
impl Send for InsertOutcome
impl Sync for InsertOutcome
impl Unpin for InsertOutcome
impl UnsafeUnpin for InsertOutcome
impl UnwindSafe for InsertOutcome
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