pub struct WlanRx { /* private fields */ }
Implementations§
Source§impl WlanRx
impl WlanRx
Sourcepub fn new(sender: Box<dyn WlanRxEventSender>) -> Self
pub fn new(sender: Box<dyn WlanRxEventSender>) -> Self
Return a pinned WlanRx
.
Pinning the returned value is imperative to ensure future to_c_binding()
calls will return
pointers that are valid for the lifetime of the returned value.
Sourcepub unsafe fn to_ffi(&self) -> FfiWlanRx
pub unsafe fn to_ffi(&self) -> FfiWlanRx
Returns a FfiWlanRx
containing functions to queue WlanRxEvent
values into the
corresponding WlanRx
.
Note that the pointers in the returned FfiWlanRx
are all to static and pinned values
so it’s safe to move this WlanRx
after calling this function.
§Safety
This method unsafe because we cannot guarantee the returned FfiWlanRxCtx
will have a lifetime that is shorther than this WlanRx
.
By using this method, the caller promises the lifetime of this WlanRx
will exceed the
ctx
pointer used across the FFI boundary.
Auto Trait Implementations§
impl Freeze for WlanRx
impl !RefUnwindSafe for WlanRx
impl !Send for WlanRx
impl !Sync for WlanRx
impl Unpin for WlanRx
impl !UnwindSafe for WlanRx
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