Struct pravega_client_shared::StreamSegments
source · pub struct StreamSegments {
pub key_segment_map: OrdMap<OrderedFloat<f64>, SegmentWithRange>,
}
Fields§
§key_segment_map: OrdMap<OrderedFloat<f64>, SegmentWithRange>
Implementations§
source§impl StreamSegments
impl StreamSegments
pub fn new( map_key_segment: BTreeMap<OrderedFloat<f64>, SegmentWithRange> ) -> StreamSegments
sourcepub fn get_segment_for_routing_key(
&self,
routing_key: &Option<String>,
rand_f64: fn() -> f64
) -> &ScopedSegment
pub fn get_segment_for_routing_key( &self, routing_key: &Option<String>, rand_f64: fn() -> f64 ) -> &ScopedSegment
Selects a segment using a routing key.
pub fn get_segment(&self, key: f64) -> &ScopedSegment
pub fn get_segment_for_string(&self, str: &str) -> &ScopedSegment
pub fn get_segments(&self) -> Vec<ScopedSegment>
pub fn apply_replacement_range( &self, segment_replace: &Segment, replacement_ranges: &StreamSegmentsWithPredecessors ) -> Result<StreamSegments, String>
Trait Implementations§
source§impl Clone for StreamSegments
impl Clone for StreamSegments
source§fn clone(&self) -> StreamSegments
fn clone(&self) -> StreamSegments
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StreamSegments
impl Debug for StreamSegments
source§impl Hash for StreamSegments
impl Hash for StreamSegments
source§impl PartialEq for StreamSegments
impl PartialEq for StreamSegments
source§fn eq(&self, other: &StreamSegments) -> bool
fn eq(&self, other: &StreamSegments) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for StreamSegments
impl StructuralPartialEq for StreamSegments
Auto Trait Implementations§
impl RefUnwindSafe for StreamSegments
impl Send for StreamSegments
impl Sync for StreamSegments
impl Unpin for StreamSegments
impl UnwindSafe for StreamSegments
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