pub struct StreamTrim {
pub strategy: StreamTrimStrategy,
pub max_len: u64,
pub min_id: StreamId,
pub limit: Option<usize>,
}Expand description
Stream trim configuration (aligned with Apache Kvrocks StreamTrimOpt). Stream 裁剪配置(对标 Apache Kvrocks StreamTrimOpt)
Fields§
§strategy: StreamTrimStrategy§max_len: u64§min_id: StreamId§limit: Option<usize>Implementations§
Source§impl StreamTrim
impl StreamTrim
pub fn none() -> Self
pub fn maxlen(max_len: u64) -> Self
pub fn minid(min_id: StreamId) -> Self
pub fn with_limit(self, limit: usize) -> Self
pub fn from_options(options: impl IntoIterator<Item = XTrim>) -> Self
Trait Implementations§
Source§impl Clone for StreamTrim
impl Clone for StreamTrim
Source§fn clone(&self) -> StreamTrim
fn clone(&self) -> StreamTrim
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 StreamTrim
Source§impl Debug for StreamTrim
impl Debug for StreamTrim
impl<'__de> Decode<'__de> for StreamTrimwhere
'__de:,
Source§impl Default for StreamTrim
impl Default for StreamTrim
Source§fn default() -> StreamTrim
fn default() -> StreamTrim
Returns the “default value” for a type. Read more
impl Encode for StreamTrim
impl Eq for StreamTrim
Source§impl PartialEq for StreamTrim
impl PartialEq for StreamTrim
impl StructuralPartialEq for StreamTrim
Auto Trait Implementations§
impl Freeze for StreamTrim
impl RefUnwindSafe for StreamTrim
impl Send for StreamTrim
impl Sync for StreamTrim
impl Unpin for StreamTrim
impl UnsafeUnpin for StreamTrim
impl UnwindSafe for StreamTrim
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DecodeOwned for Twhere
T: for<'de> Decode<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.