[][src]Struct flexihash::Flexihash

pub struct Flexihash { /* fields omitted */ }

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]

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]

Trait Implementations

impl Debug for Flexihash[src]

impl Display for Flexihash[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.