pub struct OnSetParameterHandle(/* private fields */);Expand description
A registered OnSetParameterFn, returned by
ParameterServer::add_on_set_parameters_callback and consumed by
ParameterServer::remove_on_set_parameters_callback.
rclcpp hands back an owning ParameterCallbackHandle shared_ptr whose
destruction unregisters. With no allocator there is nothing to own, so this
is a plain index token and unregistering is explicit.
Implementations§
Source§impl OnSetParameterHandle
impl OnSetParameterHandle
Sourcepub const fn raw(self) -> u16
pub const fn raw(self) -> u16
The token as a plain integer, for an FFI that must hand it to C.
An opaque u16 rather than a pointer: it indexes the bounded registry
and nothing else, so a wrong value is a false from
ParameterServer::remove_on_set_parameters_callback rather than a
wild write.
Sourcepub const fn from_raw(raw: u16) -> OnSetParameterHandle
pub const fn from_raw(raw: u16) -> OnSetParameterHandle
Rebuild a handle a C caller kept. See Self::raw.
Trait Implementations§
Source§impl Clone for OnSetParameterHandle
impl Clone for OnSetParameterHandle
Source§fn clone(&self) -> OnSetParameterHandle
fn clone(&self) -> OnSetParameterHandle
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 OnSetParameterHandle
Source§impl Debug for OnSetParameterHandle
impl Debug for OnSetParameterHandle
impl Eq for OnSetParameterHandle
Source§impl PartialEq for OnSetParameterHandle
impl PartialEq for OnSetParameterHandle
impl StructuralPartialEq for OnSetParameterHandle
Auto Trait Implementations§
impl Freeze for OnSetParameterHandle
impl RefUnwindSafe for OnSetParameterHandle
impl Send for OnSetParameterHandle
impl Sync for OnSetParameterHandle
impl Unpin for OnSetParameterHandle
impl UnsafeUnpin for OnSetParameterHandle
impl UnwindSafe for OnSetParameterHandle
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