pub struct GuidPrefix(pub [u8; 12]);Expand description
The 12-octet prefix shared by the GUIDs of all entities of one participant (DDSI-RTPS 2.5, 9.3.1.1).
The first two octets must be the vendor id of the implementation (9.3.1.5).
Tuple Fields§
§0: [u8; 12]Implementations§
Source§impl GuidPrefix
impl GuidPrefix
Sourcepub const UNKNOWN: GuidPrefix
pub const UNKNOWN: GuidPrefix
GUIDPREFIX_UNKNOWN: all zeros.
Sourcepub fn generate(vendor_id: VendorId) -> GuidPrefix
pub fn generate(vendor_id: VendorId) -> GuidPrefix
Makes a prefix that is very likely unique in the domain: the vendor id in the first two octets (9.3.1.5), then ten octets mixed from the process id, the time, a counter and the standard library’s random hash keys.
Trait Implementations§
Source§impl Clone for GuidPrefix
impl Clone for GuidPrefix
Source§fn clone(&self) -> GuidPrefix
fn clone(&self) -> GuidPrefix
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 GuidPrefix
Source§impl Debug for GuidPrefix
impl Debug for GuidPrefix
Source§impl Default for GuidPrefix
impl Default for GuidPrefix
Source§fn default() -> GuidPrefix
fn default() -> GuidPrefix
Returns the “default value” for a type. Read more
impl Eq for GuidPrefix
Source§impl Hash for GuidPrefix
impl Hash for GuidPrefix
Source§impl Ord for GuidPrefix
impl Ord for GuidPrefix
Source§fn cmp(&self, other: &GuidPrefix) -> Ordering
fn cmp(&self, other: &GuidPrefix) -> 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for GuidPrefix
impl PartialEq for GuidPrefix
Source§impl PartialOrd for GuidPrefix
impl PartialOrd for GuidPrefix
impl StructuralPartialEq for GuidPrefix
Auto Trait Implementations§
impl Forget for GuidPrefix
impl Freeze for GuidPrefix
impl Move for GuidPrefix
impl RefUnwindSafe for GuidPrefix
impl Send for GuidPrefix
impl Sync for GuidPrefix
impl Unpin for GuidPrefix
impl UnsafeUnpin for GuidPrefix
impl UnwindSafe for GuidPrefix
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