Skip to main content

ActionClientCallback

Struct ActionClientCallback 

Source
pub struct ActionClientCallback<A: RosAction, const GOAL_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }, const RESULT_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }, const FEEDBACK_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }> { /* private fields */ }
Expand description

Send handle for a callback-based typed action client.

Returned by create_action_client_with_callbacks: goal-response, feedback, and result are delivered to the registered closures at spin_once (no Promise poll). This handle only sends — it holds a *mut to the arena entry’s ActionClientCore (offset 0, pinned in the executor arena, like a guard-condition flag).

§Safety / lifetime

Valid only while the owning executor lives.

Implementations§

Source§

impl<A: RosAction, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize> ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>

Source

pub fn send_goal(&mut self, goal: &A::Goal) -> Result<GoalId, NodeError>

Send a typed goal. Returns its GoalId; acceptance arrives via the registered goal-response callback.

Source

pub fn get_result(&mut self, goal_id: &GoalId) -> Result<(), NodeError>

Request the result for goal_id; the result arrives via the registered result callback.

Auto Trait Implementations§

§

impl<A, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize> Freeze for ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>

§

impl<A, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize> RefUnwindSafe for ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>
where A: RefUnwindSafe,

§

impl<A, const GOAL_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }, const RESULT_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }, const FEEDBACK_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }> !Send for ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>

§

impl<A, const GOAL_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }, const RESULT_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }, const FEEDBACK_BUF: usize = { crate::config::DEFAULT_RX_BUF_SIZE }> !Sync for ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>

§

impl<A, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize> Unpin for ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>
where A: Unpin,

§

impl<A, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize> UnsafeUnpin for ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>

§

impl<A, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize> UnwindSafe for ActionClientCallback<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>
where A: UnwindSafe,

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