Skip to main content

GoalId

Struct GoalId 

Source
pub struct GoalId {
    pub uuid: [u8; 16],
}
Expand description

Unique identifier for a goal

This is a 128-bit UUID matching unique_identifier_msgs/msg/UUID.

Fields§

§uuid: [u8; 16]

UUID bytes in standard format

Implementations§

Source§

impl GoalId

Source

pub const UUID_LEN: usize = 16

Length of the goal UUID in bytes (ROS 2 unique_identifier_msgs/UUID).

Source

pub const SEQ_PREFIX_LEN: usize = 0

Length of any CDR length-prefix preceding the goal UUID bytes — zero.

ROS 2 carries the goal id as unique_identifier_msgs/UUID, a fixed uint8[16] array; CDR fixed arrays have no length prefix, so the goal UUID sits directly after the CDR header. Pre-233.6 the action framing wrote a u32(16) sequence prefix here (this const was 4), which self-matched nano-ros peers but added 4 bytes a real rcl_action peer rejects. Kept as a named 0 (rather than deleted) so the C/C++/Cyclone framing calcs that read CDR_HEADER_LEN + SEQ_PREFIX_LEN + UUID_LEN stay correct after the migration.

Source

pub const fn new(uuid: [u8; 16]) -> GoalId

Create a new GoalId from UUID bytes

Source

pub const fn zero() -> GoalId

Create a zero/null GoalId

Source

pub fn is_zero(&self) -> bool

Check if this is a zero/null GoalId

Source

pub fn from_counter(counter: u64) -> GoalId

Create a GoalId from a simple counter (for testing/embedded use)

This creates a deterministic UUID-like identifier from a counter value. Not a true UUID, but useful for embedded systems without random number generators.

Trait Implementations§

Source§

impl Clone for GoalId

Source§

fn clone(&self) -> GoalId

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GoalId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for GoalId

Source§

fn default() -> GoalId

Returns the “default value” for a type. Read more
Source§

impl Deserialize for GoalId

Source§

fn deserialize(reader: &mut CdrReader<'_>) -> Result<GoalId, DeserError>

Deserialize a value from the CDR reader
Source§

impl Display for GoalId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Hash for GoalId

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for GoalId

Source§

fn eq(&self, other: &GoalId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for GoalId

Source§

fn serialize(&self, writer: &mut CdrWriter<'_>) -> Result<(), SerError>

Serialize this value to the CDR writer
Source§

impl Copy for GoalId

Source§

impl Eq for GoalId

Source§

impl StructuralPartialEq for GoalId

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.