#[repr(transparent)]pub struct UdpSocket<'a>(pub otUdpSocket, _, _);
Expand description
Functional equivalent of otsys::otUdpSocket
.
Tuple Fields§
§0: otUdpSocket
Implementations§
Source§impl<'a> UdpSocket<'a>
impl<'a> UdpSocket<'a>
Sourcepub fn get_handle(&self) -> Option<NonNull<c_void>>
pub fn get_handle(&self) -> Option<NonNull<c_void>>
A handle to platform’s UDP.
Sourcepub fn set_handle(&mut self, handle: Option<NonNull<c_void>>)
pub fn set_handle(&mut self, handle: Option<NonNull<c_void>>)
Change the UDP handle.
Sourcepub fn handle_receive(&self, msg: &Message<'a>, info: &Info)
pub fn handle_receive(&self, msg: &Message<'a>, info: &Info)
Platform callback for handling received data.
Trait Implementations§
Source§impl OtCastable for UdpSocket<'_>
impl OtCastable for UdpSocket<'_>
Source§fn as_ot_ptr(&self) -> *const Self::OtType
fn as_ot_ptr(&self) -> *const Self::OtType
Returns a pointer to the underlying
Self::OtType
instance.Source§fn as_ot_mut_ptr(&mut self) -> *mut Self::OtType
fn as_ot_mut_ptr(&mut self) -> *mut Self::OtType
Returns a mutable pointer to the underlying
Self::OtType
instance.Source§unsafe fn ref_from_ot_ptr<'a>(ptr: *const Self::OtType) -> Option<&'a Self>
unsafe fn ref_from_ot_ptr<'a>(ptr: *const Self::OtType) -> Option<&'a Self>
Creates a reference from a pointer to an
Self::OtType
. Read moreSource§unsafe fn mut_from_ot_mut_ptr<'a>(
ptr: *mut Self::OtType,
) -> Option<&'a mut Self>
unsafe fn mut_from_ot_mut_ptr<'a>( ptr: *mut Self::OtType, ) -> Option<&'a mut Self>
Creates a mut reference from a mut pointer to an
Self::OtType
. Read moreSource§fn as_ot_ref(&self) -> &Self::OtType
fn as_ot_ref(&self) -> &Self::OtType
Returns a reference to the original OpenThread type
Self::OtType
.Source§fn as_ot_mut(&mut self) -> &mut Self::OtType
fn as_ot_mut(&mut self) -> &mut Self::OtType
Returns a mutable reference to the original OpenThread type
Self::OtType
.Source§fn ref_from_ot_ref(x: &Self::OtType) -> &Self
fn ref_from_ot_ref(x: &Self::OtType) -> &Self
Casts a reference to the original OpenThread type to a reference to
Self
.Auto Trait Implementations§
impl<'a> Freeze for UdpSocket<'a>
impl<'a> RefUnwindSafe for UdpSocket<'a>
impl<'a> !Send for UdpSocket<'a>
impl<'a> !Sync for UdpSocket<'a>
impl<'a> Unpin for UdpSocket<'a>
impl<'a> UnwindSafe for UdpSocket<'a>
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