pub struct HashStrategy(/* private fields */);Expand description
普通hash策略
Implementations§
Source§impl HashStrategy
impl HashStrategy
Trait Implementations§
Source§impl Default for HashStrategy
impl Default for HashStrategy
Source§impl Strategy for HashStrategy
impl Strategy for HashStrategy
Source§fn remove_backend(&self, addr: &Address) -> bool
fn remove_backend(&self, addr: &Address) -> bool
移除一个后端地址
Source§fn get_backend(&self, key: &str) -> Option<BackendState>
fn get_backend(&self, key: &str) -> Option<BackendState>
获取一个后端地址
Source§fn get_backend_by_id(&self, id: u32) -> Option<BackendState>
fn get_backend_by_id(&self, id: u32) -> Option<BackendState>
获取id来获取后端地址
fn get_backend_by_code(&self, code: u64) -> Option<BackendState>
Source§fn get_backends(&self) -> Vec<BackendState>
fn get_backends(&self) -> Vec<BackendState>
获取所有后端地址
Auto Trait Implementations§
impl !Freeze for HashStrategy
impl RefUnwindSafe for HashStrategy
impl Send for HashStrategy
impl Sync for HashStrategy
impl Unpin for HashStrategy
impl UnwindSafe for HashStrategy
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