pub struct Registration(/* private fields */);Expand description
Registration state for the VPP side of an API client
A &mut Registration corresponds to a C vl_api_registration *.
Use RegistrationScope::from_client_index to obtain a mutable reference.
Implementations§
Source§impl Registration
impl Registration
Sourcepub unsafe fn from_ptr_mut<'a>(ptr: *mut vl_api_registration_t) -> &'a mut Self
pub unsafe fn from_ptr_mut<'a>(ptr: *mut vl_api_registration_t) -> &'a mut Self
Construct a &mut Registration from a raw vl_api_registration_t pointer.
§Safety
ptrmust be a valid, non-null pointer to avl_api_registration_t.- The caller must ensure exclusive mutable access for the returned lifetime
'a(no other references or concurrent uses may alias the same underlying registration for the duration of the returned borrow). - The pointer must remain valid for the returned lifetime and must not be freed or invalidated while the borrow is active.
Sourcepub fn as_ptr(&self) -> *mut vl_api_registration_t
pub fn as_ptr(&self) -> *mut vl_api_registration_t
Return the raw vl_api_registration_t pointer for this Registration.
Sourcepub fn send_message<T>(&mut self, message: Message<T>)
pub fn send_message<T>(&mut self, message: Message<T>)
Send a message to the registration.
This consumes message and transfers ownership of the underlying buffer to VPP.
Auto Trait Implementations§
impl Freeze for Registration
impl !RefUnwindSafe for Registration
impl !Send for Registration
impl !Sync for Registration
impl Unpin for Registration
impl UnsafeUnpin for Registration
impl UnwindSafe for Registration
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