pub struct InterfaceId(/* private fields */);Implementations§
Source§impl InterfaceId
impl InterfaceId
pub const fn new(bytes: [u8; 8]) -> InterfaceId
pub const fn as_bytes(&self) -> &[u8; 8]
pub fn kind(&self) -> Option<InterfaceKind>
Sourcepub fn from_channel_tag(kind: InterfaceKind, channel_tag: &[u8]) -> InterfaceId
pub fn from_channel_tag(kind: InterfaceKind, channel_tag: &[u8]) -> InterfaceId
The caller must not assign the same channel_tag to concurrent channels of the same kind.
Trait Implementations§
Source§impl Clone for InterfaceId
impl Clone for InterfaceId
Source§fn clone(&self) -> InterfaceId
fn clone(&self) -> InterfaceId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InterfaceId
Source§impl Debug for InterfaceId
impl Debug for InterfaceId
impl Eq for InterfaceId
Source§impl Hash for InterfaceId
impl Hash for InterfaceId
Source§impl IndexKey for InterfaceId
impl IndexKey for InterfaceId
Source§fn lemire_key(&self) -> u64
fn lemire_key(&self) -> u64
Little-endian, unlike the hash keys above: an id’s first byte is its kind, shared by every interface of that kind (a server’s thousand TCP clients all match), and the bucket reduction weighs high bits most. Read low-endian, the kind byte lands in the bits the reduction barely sees and the channel-tag hash bytes pick the bucket.
Source§impl Ord for InterfaceId
impl Ord for InterfaceId
Source§fn cmp(&self, other: &InterfaceId) -> Ordering
fn cmp(&self, other: &InterfaceId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for InterfaceId
impl PartialEq for InterfaceId
Source§impl PartialOrd for InterfaceId
impl PartialOrd for InterfaceId
impl StructuralPartialEq for InterfaceId
Auto Trait Implementations§
impl Freeze for InterfaceId
impl RefUnwindSafe for InterfaceId
impl Send for InterfaceId
impl Sync for InterfaceId
impl Unpin for InterfaceId
impl UnsafeUnpin for InterfaceId
impl UnwindSafe for InterfaceId
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