Skip to main content

ActionServerRawHandle

Struct ActionServerRawHandle 

Source
pub struct ActionServerRawHandle { /* private fields */ }
Expand description

Handle to a raw (untyped) action server registered in the executor’s arena.

Returned by Executor::register_action_server_raw(). Provides methods to interact with the server using raw CDR bytes.

Implementations§

Source§

impl ActionServerRawHandle

Source

pub const fn invalid() -> ActionServerRawHandle

Construct a sentinel handle representing “not registered yet”.

All function pointers are unreachable stubs; only valid use is to populate #[repr(C)] storage that is later overwritten by a real handle (or queried via is_invalid() to skip operations).

Source

pub const fn is_invalid(&self) -> bool

true if this handle is the sentinel returned by Self::invalid().

Source§

impl ActionServerRawHandle

Source

pub fn handle_id(&self) -> HandleId

Get the HandleId for this action server.

Source

pub fn publish_feedback_raw( &self, executor: &mut Executor, goal_id: &GoalId, feedback_data: &[u8], ) -> Result<(), NodeError>

Publish feedback with raw CDR bytes (untyped variant).

Used by the C API when feedback is already serialised.

Source

pub fn complete_goal_raw( &self, executor: &mut Executor, goal_id: &GoalId, status: GoalStatus, result_data: &[u8], )

Complete a goal with raw CDR result bytes (untyped variant).

Moves the goal from the active set to the completed-results slab.

Source

pub fn set_goal_status( &self, executor: &mut Executor, goal_id: &GoalId, status: GoalStatus, )

Update a goal’s status without completing it.

Use this to transition a goal to Executing or Canceling while it is still active. To finish a goal, use complete_goal_raw.

Source

pub fn active_goal_count(&self, executor: &Executor) -> usize

Get the number of currently active goals.

Returns 0 if the action server handle has been removed from the executor.

Source

pub fn for_each_active_goal( &self, executor: &Executor, f: impl FnMut(&RawActiveGoal), )

Iterate over all currently active goals (raw/untyped variant).

Calls f for each goal that has been accepted but not yet completed.

Source

pub fn goal_status( &self, executor: &Executor, goal_id: &GoalId, ) -> Option<GoalStatus>

Look up the status of a single active goal by UUID.

Returns Some(status) while the goal is still in the arena’s active_goals vector. Returns None once the goal has been retired (completed + result delivered, or cancelled + acknowledged).

This is the authoritative source of goal status — the C/C++ FFI layers call this from nros_action_get_goal_status rather than reading a cached field on their own handle structs.

Trait Implementations§

Source§

impl Clone for ActionServerRawHandle

Source§

fn clone(&self) -> ActionServerRawHandle

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 Default for ActionServerRawHandle

Source§

fn default() -> ActionServerRawHandle

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

impl Copy for ActionServerRawHandle

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, 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.