pub struct InstanceHandle(/* private fields */);Expand description
Opaque InstanceHandle_t (DDS-DCPS 1.4 §2.3.3).
Implementations§
Source§impl InstanceHandle
impl InstanceHandle
Sourcepub const NIL: InstanceHandle
pub const NIL: InstanceHandle
Reserved “no handle” value (spec convention).
Sourcepub const fn from_raw(raw: u64) -> InstanceHandle
pub const fn from_raw(raw: u64) -> InstanceHandle
Constructor from a raw u64 value. Low-level API — normally the
InstanceHandleAllocator produces the values.
Sourcepub fn from_guid(guid: Guid) -> InstanceHandle
pub fn from_guid(guid: Guid) -> InstanceHandle
Deterministic derivation of an InstanceHandle from a Guid
(16-byte BuiltinTopicKey). Used for the ignore_* /
get_discovered_* APIs (DDS DCPS 1.4 §2.2.2.2.1.14-17,
§2.2.2.2.1.27-30), because there the spec requires
InstanceHandle_t as the argument, while the builtin subscriber
keeps BuiltinTopicKey_t (= Guid) as the sample key.
Implementation: 64-bit FNV-1a over all 16 bytes — fast, no_std,
low collision for a few thousand discovered entities.
HANDLE_NIL is avoided by bumping it up to 1.
Trait Implementations§
Source§impl Clone for InstanceHandle
impl Clone for InstanceHandle
Source§fn clone(&self) -> InstanceHandle
fn clone(&self) -> InstanceHandle
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 InstanceHandle
Source§impl Debug for InstanceHandle
impl Debug for InstanceHandle
Source§impl Default for InstanceHandle
impl Default for InstanceHandle
Source§fn default() -> InstanceHandle
fn default() -> InstanceHandle
Returns the “default value” for a type. Read more
Source§impl Display for InstanceHandle
impl Display for InstanceHandle
impl Eq for InstanceHandle
Source§impl Hash for InstanceHandle
impl Hash for InstanceHandle
Source§impl Ord for InstanceHandle
impl Ord for InstanceHandle
Source§fn cmp(&self, other: &InstanceHandle) -> Ordering
fn cmp(&self, other: &InstanceHandle) -> 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 InstanceHandle
impl PartialEq for InstanceHandle
Source§fn eq(&self, other: &InstanceHandle) -> bool
fn eq(&self, other: &InstanceHandle) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for InstanceHandle
impl PartialOrd for InstanceHandle
impl StructuralPartialEq for InstanceHandle
Auto Trait Implementations§
impl Freeze for InstanceHandle
impl RefUnwindSafe for InstanceHandle
impl Send for InstanceHandle
impl Sync for InstanceHandle
impl Unpin for InstanceHandle
impl UnsafeUnpin for InstanceHandle
impl UnwindSafe for InstanceHandle
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