pub struct ContinuumPoint {
pub token: DynToken,
pub server: usize,
}Expand description
One entry on the continuum: a token and the index of the server that owns it.
§Examples
use dynomite::hashkit::ketama::{Continuum, ServerSpec};
let c = Continuum::build(&[ServerSpec { name: "a".into(), weight: 1 }]).unwrap();
let p = c.points().first().unwrap();
assert_eq!(p.server, 0);Fields§
§token: DynTokenSorted-by-token coordinate.
server: usizeIndex back into the original server list.
Trait Implementations§
Source§impl Clone for ContinuumPoint
impl Clone for ContinuumPoint
Source§fn clone(&self) -> ContinuumPoint
fn clone(&self) -> ContinuumPoint
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 moreAuto Trait Implementations§
impl Freeze for ContinuumPoint
impl RefUnwindSafe for ContinuumPoint
impl Send for ContinuumPoint
impl Sync for ContinuumPoint
impl Unpin for ContinuumPoint
impl UnsafeUnpin for ContinuumPoint
impl UnwindSafe for ContinuumPoint
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