pub struct StreamRange {
pub start: StreamId,
pub end: StreamId,
pub count: Option<usize>,
pub reverse: bool,
pub exclude_start: bool,
pub exclude_end: bool,
}Expand description
XRANGE / XREVRANGE configuration structure (aligned with Kvrocks StreamRangeOpt). XRANGE / XREVRANGE 配置选项(对标 Apache Kvrocks StreamRangeOpt)
Fields§
§start: StreamId§end: StreamId§count: Option<usize>§reverse: bool§exclude_start: bool§exclude_end: boolImplementations§
Source§impl StreamRange
impl StreamRange
pub fn new(start: StreamId, end: StreamId) -> Self
pub fn reverse(start: StreamId, end: StreamId) -> Self
pub fn with_count(self, count: usize) -> Self
pub fn exclude_start(self, exclude: bool) -> Self
pub fn exclude_end(self, exclude: bool) -> Self
pub fn from_options( start: StreamId, end: StreamId, options: impl IntoIterator<Item = XRange>, ) -> Self
Trait Implementations§
Source§impl Clone for StreamRange
impl Clone for StreamRange
Source§fn clone(&self) -> StreamRange
fn clone(&self) -> StreamRange
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 StreamRange
Source§impl Debug for StreamRange
impl Debug for StreamRange
impl<'__de> Decode<'__de> for StreamRangewhere
'__de:,
Source§impl Default for StreamRange
impl Default for StreamRange
impl Encode for StreamRange
impl Eq for StreamRange
Source§impl From<&StreamRange> for StreamRange
impl From<&StreamRange> for StreamRange
Source§fn from(opt: &StreamRange) -> Self
fn from(opt: &StreamRange) -> Self
Converts to this type from the input type.
Source§impl From<RangeFull> for StreamRange
impl From<RangeFull> for StreamRange
Source§impl From<RangeInclusive<StreamId>> for StreamRange
impl From<RangeInclusive<StreamId>> for StreamRange
Source§fn from(r: RangeInclusive<StreamId>) -> Self
fn from(r: RangeInclusive<StreamId>) -> Self
Converts to this type from the input type.
Source§impl From<RangeToInclusive<StreamId>> for StreamRange
impl From<RangeToInclusive<StreamId>> for StreamRange
Source§fn from(r: RangeToInclusive<StreamId>) -> Self
fn from(r: RangeToInclusive<StreamId>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StreamRange
impl PartialEq for StreamRange
impl StructuralPartialEq for StreamRange
Auto Trait Implementations§
impl Freeze for StreamRange
impl RefUnwindSafe for StreamRange
impl Send for StreamRange
impl Sync for StreamRange
impl Unpin for StreamRange
impl UnsafeUnpin for StreamRange
impl UnwindSafe for StreamRange
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.