pub struct BatchAssignment {
pub assignments: HashMap<String, String>,
pub unassigned: Vec<String>,
}Expand description
Shard assignment result for a batch of keys.
Fields§
§assignments: HashMap<String, String>Map of key -> assigned node_id.
unassigned: Vec<String>Keys that could not be assigned (empty ring).
Implementations§
Source§impl BatchAssignment
impl BatchAssignment
Sourcepub fn assigned_count(&self) -> usize
pub fn assigned_count(&self) -> usize
Number of successfully assigned keys.
Sourcepub fn unassigned_count(&self) -> usize
pub fn unassigned_count(&self) -> usize
Number of unassigned keys.
Trait Implementations§
Source§impl Clone for BatchAssignment
impl Clone for BatchAssignment
Source§fn clone(&self) -> BatchAssignment
fn clone(&self) -> BatchAssignment
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 moreSource§impl Debug for BatchAssignment
impl Debug for BatchAssignment
Auto Trait Implementations§
impl Freeze for BatchAssignment
impl RefUnwindSafe for BatchAssignment
impl Send for BatchAssignment
impl Sync for BatchAssignment
impl Unpin for BatchAssignment
impl UnsafeUnpin for BatchAssignment
impl UnwindSafe for BatchAssignment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request