[−][src]Struct flexihash::Flexihash
Methods
impl Flexihash
[src]
pub fn new() -> Flexihash
[src]
pub fn set_hasher(&mut self, hasher: Hasher)
[src]
pub fn set_replicas(&mut self, replicas: u32)
[src]
impl Flexihash
[src]
pub fn add_target<S: Into<String>>(
&mut self,
target: S,
weight: u32
) -> &Flexihash
[src]
&mut self,
target: S,
weight: u32
) -> &Flexihash
pub fn add_targets<S: Into<String>>(&mut self, targets: Vec<S>) -> &Flexihash
[src]
pub fn remove_target<S: Into<String>>(&mut self, target: S) -> &Flexihash
[src]
pub fn get_all_targets(&self) -> Vec<Target>
[src]
impl Flexihash
[src]
pub fn lookup<S: Into<String>>(&self, resource: S) -> Target
[src]
pub fn lookup_list<S: Into<String>>(
&self,
resource: S,
requested_count: u32
) -> Vec<Target>
[src]
&self,
resource: S,
requested_count: u32
) -> Vec<Target>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Flexihash
impl Send for Flexihash
impl Sync for Flexihash
impl Unpin for Flexihash
impl UnwindSafe for Flexihash
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,