pub struct TableData {
pub allocation: BTreeMap<u64, NonZeroU64>,
pub params: TableParams,
}
Fields§
§allocation: BTreeMap<u64, NonZeroU64>
§params: TableParams
Implementations§
Source§impl TableData
impl TableData
Sourcefn virt_to_peer(&self, virt: u64) -> &'static Peer
fn virt_to_peer(&self, virt: u64) -> &'static Peer
Return the peer on position virt
on the hash ring.
pub fn peers(&self) -> impl Iterator<Item = &'static Peer> + use<'_>
Sourcepub fn peers_for_key(
&self,
key: &[u8],
) -> impl Iterator<Item = &'static Peer> + use<'_>
pub fn peers_for_key( &self, key: &[u8], ) -> impl Iterator<Item = &'static Peer> + use<'_>
Return an iterator over the peers that are responsible for the given key.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TableData
impl<'de> Deserialize<'de> for TableData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TableData
impl RefUnwindSafe for TableData
impl Send for TableData
impl Sync for TableData
impl Unpin for TableData
impl UnwindSafe for TableData
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