pub struct PartitionRange {
pub start: u64,
pub end: u64,
pub inclusive_start: bool,
pub inclusive_end: bool,
}Expand description
A range of partition keys.
Fields§
§start: u64§end: u64§inclusive_start: bool§inclusive_end: boolImplementations§
Source§impl PartitionRange
impl PartitionRange
Sourcepub fn split(&self, num_parts: u32) -> Vec<PartitionRange>
pub fn split(&self, num_parts: u32) -> Vec<PartitionRange>
Split this range into N equal parts.
Sourcepub fn merge(&self, other: &PartitionRange) -> Option<PartitionRange>
pub fn merge(&self, other: &PartitionRange) -> Option<PartitionRange>
Merge two adjacent ranges.
Trait Implementations§
Source§impl Clone for PartitionRange
impl Clone for PartitionRange
Source§fn clone(&self) -> PartitionRange
fn clone(&self) -> PartitionRange
Returns a duplicate 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 PartitionRange
impl Debug for PartitionRange
Source§impl<'de> Deserialize<'de> for PartitionRange
impl<'de> Deserialize<'de> for PartitionRange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PartitionRange
impl RefUnwindSafe for PartitionRange
impl Send for PartitionRange
impl Sync for PartitionRange
impl Unpin for PartitionRange
impl UnsafeUnpin for PartitionRange
impl UnwindSafe for PartitionRange
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