pub enum Trim {
None,
MaxLen {
len: u64,
exact: bool,
limit: Option<u64>,
},
MinId {
id: Id,
exact: bool,
limit: Option<u64>,
},
}Expand description
What a trim was told to cut down to.
exact is Redis’s = against ~. Without it only whole nodes go, so the
stream is left at the threshold or a little over and no node is ever
rewritten, which is the form to use and is why ~ exists.
limit only ever arrives with ~, because Redis refuses the two together
with = and the wire layer refuses it here for the same reason: the limit
is a brake on how long one command runs, and an exact trim that stopped
early would not have done what it was asked.
Variants§
None
No trim, which is XADD without a MAXLEN or a MINID.
MaxLen
MAXLEN n, which keeps the newest n entries.
Fields
MinId
MINID id, which drops everything below id.
Trait Implementations§
impl Copy for Trim
impl Eq for Trim
impl StructuralPartialEq for Trim
Auto Trait Implementations§
impl Freeze for Trim
impl RefUnwindSafe for Trim
impl Send for Trim
impl Sync for Trim
impl Unpin for Trim
impl UnsafeUnpin for Trim
impl UnwindSafe for Trim
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