pub struct ServerSpec {
pub name: String,
pub weight: u32,
}Expand description
Specification for one server in the continuum.
§Examples
use dynomite::hashkit::ketama::ServerSpec;
let s = ServerSpec { name: "redis-a".into(), weight: 2 };
assert_eq!(s.weight, 2);Fields§
§name: StringStable, unique identifier (used to derive the continuum points).
weight: u32Relative weight; higher weights map to more continuum points.
Trait Implementations§
Source§impl Clone for ServerSpec
impl Clone for ServerSpec
Source§fn clone(&self) -> ServerSpec
fn clone(&self) -> ServerSpec
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 ServerSpec
impl RefUnwindSafe for ServerSpec
impl Send for ServerSpec
impl Sync for ServerSpec
impl Unpin for ServerSpec
impl UnsafeUnpin for ServerSpec
impl UnwindSafe for ServerSpec
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