pub struct Flexihash { /* private fields */ }
Implementations§
source§impl Flexihash
impl Flexihash
pub fn new() -> Flexihash
pub fn set_hasher(&mut self, hasher: Hasher)
pub fn set_replicas(&mut self, replicas: u32)
source§impl Flexihash
impl Flexihash
pub fn add_target<S: Into<String>>( &mut self, target: S, weight: u32 ) -> &Flexihash
pub fn add_targets<S: Into<String>>(&mut self, targets: Vec<S>) -> &Flexihash
pub fn remove_target<S: Into<String>>(&mut self, target: S) -> &Flexihash
pub fn get_all_targets(&self) -> Vec<Target>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Flexihash
impl RefUnwindSafe for Flexihash
impl Send for Flexihash
impl Sync for Flexihash
impl Unpin for Flexihash
impl UnwindSafe for Flexihash
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