pub struct UdpStack {
static_socket_factory: fn() -> Option<&'static mut MaybeUninit<sock_udp_t>>,
}
Available on
riot_module_sock_udp
and riot_module_sock_aux_local
and crate feature with_embedded_nal_async
only.Fields§
§static_socket_factory: fn() -> Option<&'static mut MaybeUninit<sock_udp_t>>
Implementations§
Source§impl UdpStack
impl UdpStack
pub fn new( factory: fn() -> Option<&'static mut MaybeUninit<sock_udp_t>>, ) -> Self
Sourcefn create(
&self,
local: Option<UdpEp>,
remote: Option<UdpEp>,
flags: u16,
) -> Result<&'static mut sock_udp_t, NumericError>
fn create( &self, local: Option<UdpEp>, remote: Option<UdpEp>, flags: u16, ) -> Result<&'static mut sock_udp_t, NumericError>
Wrpper for sock_udp_create that pulls its immovable item right out of the factory
Trait Implementations§
Source§impl UdpStack for UdpStack
impl UdpStack for UdpStack
Source§type Error = NumericError
type Error = NumericError
Error type returned on socket creation failure.
Source§type Connected = ConnectedUdpSocket
type Connected = ConnectedUdpSocket
Eventual socket return type of the [
.connect()
] methodSource§type UniquelyBound = UnconnectedUdpSocket
type UniquelyBound = UnconnectedUdpSocket
Eventual socket return type of the [
.bind_single()
] methodSource§type MultiplyBound = UnconnectedUdpSocket
type MultiplyBound = UnconnectedUdpSocket
Eventual return type of the [
.bind_multiple()
] methodSource§async fn connect_from(
&self,
local: SocketAddr,
remote: SocketAddr,
) -> Result<(SocketAddr, Self::Connected), Self::Error>
async fn connect_from( &self, local: SocketAddr, remote: SocketAddr, ) -> Result<(SocketAddr, Self::Connected), Self::Error>
Create a socket that has a fixed remote address. Read more
Source§async fn bind_single(
&self,
local: SocketAddr,
) -> Result<(SocketAddr, Self::UniquelyBound), Self::Error>
async fn bind_single( &self, local: SocketAddr, ) -> Result<(SocketAddr, Self::UniquelyBound), Self::Error>
Create a socket that has a fixed local address. Read more
Source§async fn bind_multiple(
&self,
local: SocketAddr,
) -> Result<Self::MultiplyBound, Self::Error>
async fn bind_multiple( &self, local: SocketAddr, ) -> Result<Self::MultiplyBound, Self::Error>
Create a socket that has no single fixed local address. Read more
Source§async fn connect(
&self,
remote: SocketAddr,
) -> Result<(SocketAddr, Self::Connected), Self::Error>
async fn connect( &self, remote: SocketAddr, ) -> Result<(SocketAddr, Self::Connected), Self::Error>
Create a socket that has a fixed remote address. Read more
Auto Trait Implementations§
impl Freeze for UdpStack
impl RefUnwindSafe for UdpStack
impl Send for UdpStack
impl Sync for UdpStack
impl Unpin for UdpStack
impl UnwindSafe for UdpStack
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
Source§impl<T> IntoSwitch for T
impl<T> IntoSwitch for T
Source§fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
fn into_switch<ActiveLevel>(self) -> Switch<T, ActiveLevel>
Source§fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
fn into_active_high_switch(self) -> Switch<Self, ActiveHigh>where
Self: Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes