Struct embedded_nal_async_std::Stack
source · [−]pub struct Stack { /* private fields */ }
Expand description
Async-std stack for embedded-nal Doesn’t actually do or contain anything
Implementations
Trait Implementations
sourceimpl Dns for Stack
impl Dns for Stack
type GetHostByNameFuture<'m>
where
Self: 'm = impl Future<Output = Result<IpAddr, <Stack as Dns>::Error>>
type GetHostByNameFuture<'m>
where
Self: 'm = impl Future<Output = Result<IpAddr, <Stack as Dns>::Error>>
Future for get_host_by_name
sourcefn get_host_by_name<'m>(
&'m self,
host: &'m str,
addr_type: AddrType
) -> Self::GetHostByNameFuture<'m>
fn get_host_by_name<'m>(
&'m self,
host: &'m str,
addr_type: AddrType
) -> Self::GetHostByNameFuture<'m>
Resolve the first ip address of a host, given its hostname and a desired address record type to look for Read more
type GetHostByAddressFuture<'m>
where
Self: 'm = Ready<Result<String<256_usize>, <Stack as Dns>::Error>>
type GetHostByAddressFuture<'m>
where
Self: 'm = Ready<Result<String<256_usize>, <Stack as Dns>::Error>>
Future for get_host_by_address
sourcefn get_host_by_address(&self, _addr: IpAddr) -> Self::GetHostByAddressFuture<'_>
fn get_host_by_address(&self, _addr: IpAddr) -> Self::GetHostByAddressFuture<'_>
Resolve the hostname of a host, given its ip address Read more
sourceimpl TcpClientStack for Stack
impl TcpClientStack for Stack
type TcpSocket = TcpSocket
type TcpSocket = TcpSocket
The type returned when we create a new TCP socket
type SocketFuture<'m>
where
Self: 'm = Ready<Result<TcpSocket, <Stack as TcpClientStack>::Error>>
type SocketFuture<'m>
where
Self: 'm = Ready<Result<TcpSocket, <Stack as TcpClientStack>::Error>>
Future returned by socket
function.
sourcefn socket<'m>(&'m mut self) -> Self::SocketFuture<'m>
fn socket<'m>(&'m mut self) -> Self::SocketFuture<'m>
Open a socket for usage as a TCP client. Read more
type ConnectFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as TcpClientStack>::Error>>
type ConnectFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as TcpClientStack>::Error>>
Future returned by connect
function.
sourcefn connect<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket,
remote: SocketAddr
) -> Self::ConnectFuture<'m>
fn connect<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket,
remote: SocketAddr
) -> Self::ConnectFuture<'m>
Connect to the given remote host and port. Read more
type IsConnectedFuture<'m>
where
Self: 'm = Ready<Result<bool, <Stack as TcpClientStack>::Error>>
type IsConnectedFuture<'m>
where
Self: 'm = Ready<Result<bool, <Stack as TcpClientStack>::Error>>
Future returned by is_connected
function.
sourcefn is_connected<'m>(
&'m mut self,
socket: &'m Self::TcpSocket
) -> Self::IsConnectedFuture<'m>
fn is_connected<'m>(
&'m mut self,
socket: &'m Self::TcpSocket
) -> Self::IsConnectedFuture<'m>
Check if this socket is connected
type SendFuture<'m>
where
Self: 'm = impl Future<Output = Result<usize, <Stack as TcpClientStack>::Error>>
type SendFuture<'m>
where
Self: 'm = impl Future<Output = Result<usize, <Stack as TcpClientStack>::Error>>
Future returned by send
function.
sourcefn send<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket,
buffer: &'m [u8]
) -> Self::SendFuture<'m>
fn send<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket,
buffer: &'m [u8]
) -> Self::SendFuture<'m>
Write to the stream. Read more
type ReceiveFuture<'m>
where
Self: 'm = impl Future<Output = Result<usize, <Stack as TcpClientStack>::Error>>
type ReceiveFuture<'m>
where
Self: 'm = impl Future<Output = Result<usize, <Stack as TcpClientStack>::Error>>
Future returned by receive
function.
sourcefn receive<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket,
buffer: &'m mut [u8]
) -> Self::ReceiveFuture<'m>
fn receive<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket,
buffer: &'m mut [u8]
) -> Self::ReceiveFuture<'m>
Receive data from the stream. Read more
type CloseFuture<'m>
where
Self: 'm = Ready<Result<(), <Stack as TcpClientStack>::Error>>
type CloseFuture<'m>
where
Self: 'm = Ready<Result<(), <Stack as TcpClientStack>::Error>>
Future returned by close
function.
sourcefn close<'m>(&'m mut self, _socket: Self::TcpSocket) -> Self::CloseFuture<'m>
fn close<'m>(&'m mut self, _socket: Self::TcpSocket) -> Self::CloseFuture<'m>
Close an existing TCP socket.
sourceimpl TcpFullStack for Stack
impl TcpFullStack for Stack
type BindFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as TcpClientStack>::Error>>
type BindFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as TcpClientStack>::Error>>
Future returned by bind
function.
sourcefn bind<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket,
local_port: u16
) -> Self::BindFuture<'m>
fn bind<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket,
local_port: u16
) -> Self::BindFuture<'m>
Create a new TCP socket and bind it to the specified local port. Read more
type ListenFuture<'m>
where
Self: 'm = Ready<Result<(), <Stack as TcpClientStack>::Error>>
type ListenFuture<'m>
where
Self: 'm = Ready<Result<(), <Stack as TcpClientStack>::Error>>
Future returned by listen
function.
sourcefn listen<'m>(
&'m mut self,
_socket: &'m mut Self::TcpSocket
) -> Self::ListenFuture<'m>
fn listen<'m>(
&'m mut self,
_socket: &'m mut Self::TcpSocket
) -> Self::ListenFuture<'m>
Begin listening for connection requests on a previously-bound socket. Read more
type AcceptFuture<'m>
where
Self: 'm = impl Future<Output = Result<(<Stack as TcpClientStack>::TcpSocket, SocketAddr), <Stack as TcpClientStack>::Error>>
type AcceptFuture<'m>
where
Self: 'm = impl Future<Output = Result<(<Stack as TcpClientStack>::TcpSocket, SocketAddr), <Stack as TcpClientStack>::Error>>
Future returned by accept
function.
sourcefn accept<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket
) -> Self::AcceptFuture<'m>
fn accept<'m>(
&'m mut self,
socket: &'m mut Self::TcpSocket
) -> Self::AcceptFuture<'m>
Accept an active connection request on a listening socket. Read more
sourceimpl UdpClientStack for Stack
impl UdpClientStack for Stack
type UdpSocket = UdpSocket
type UdpSocket = UdpSocket
The type returned when we create a new UDP socket
type SocketFuture<'m>
where
Self: 'm = Ready<Result<<Stack as UdpClientStack>::UdpSocket, Error>>
type SocketFuture<'m>
where
Self: 'm = Ready<Result<<Stack as UdpClientStack>::UdpSocket, Error>>
Future returned by socket
function.
sourcefn socket<'m>(&'m mut self) -> Self::SocketFuture<'m>
fn socket<'m>(&'m mut self) -> Self::SocketFuture<'m>
Open a socket for usage as a UDP client. Read more
type ConnectFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as UdpClientStack>::Error>>
type ConnectFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as UdpClientStack>::Error>>
Future returned by connect
function.
sourcefn connect<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
remote: SocketAddr
) -> Self::ConnectFuture<'m>
fn connect<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
remote: SocketAddr
) -> Self::ConnectFuture<'m>
Connect a UDP socket with a peer using a dynamically selected port. Read more
type SendFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as UdpClientStack>::Error>>
type SendFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as UdpClientStack>::Error>>
Future returned by send
function.
sourcefn send<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
buffer: &'m [u8]
) -> Self::SendFuture<'m>
fn send<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
buffer: &'m [u8]
) -> Self::SendFuture<'m>
Send a datagram to the remote host. Read more
type ReceiveFuture<'m>
where
Self: 'm = impl Future<Output = Result<(usize, SocketAddr), <Stack as UdpClientStack>::Error>>
type ReceiveFuture<'m>
where
Self: 'm = impl Future<Output = Result<(usize, SocketAddr), <Stack as UdpClientStack>::Error>>
Future returned by receive
function.
sourcefn receive<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
buffer: &'m mut [u8]
) -> Self::ReceiveFuture<'m>
fn receive<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
buffer: &'m mut [u8]
) -> Self::ReceiveFuture<'m>
Read a datagram the remote host has sent to us. Read more
type CloseFuture<'m>
where
Self: 'm = Ready<Result<(), <Stack as UdpClientStack>::Error>>
type CloseFuture<'m>
where
Self: 'm = Ready<Result<(), <Stack as UdpClientStack>::Error>>
Future returned by close
function.
sourcefn close<'m>(&'m mut self, _socket: Self::UdpSocket) -> Self::CloseFuture<'m>
fn close<'m>(&'m mut self, _socket: Self::UdpSocket) -> Self::CloseFuture<'m>
Close an existing UDP socket.
sourceimpl UdpFullStack for Stack
impl UdpFullStack for Stack
type BindFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as UdpClientStack>::Error>>
type BindFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as UdpClientStack>::Error>>
Future returned by bind
function.
sourcefn bind<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
local_port: u16
) -> Self::BindFuture<'m>
fn bind<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
local_port: u16
) -> Self::BindFuture<'m>
Bind a UDP socket with a specified port
type SendToFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as UdpClientStack>::Error>>
type SendToFuture<'m>
where
Self: 'm = impl Future<Output = Result<(), <Stack as UdpClientStack>::Error>>
Future returned by send_to
function.
sourcefn send_to<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
remote: SocketAddr,
buffer: &'m [u8]
) -> Self::SendToFuture<'m>
fn send_to<'m>(
&'m mut self,
socket: &'m mut Self::UdpSocket,
remote: SocketAddr,
buffer: &'m [u8]
) -> Self::SendToFuture<'m>
Send a packet to a remote host/port.
Auto Trait Implementations
impl RefUnwindSafe for Stack
impl Send for Stack
impl Sync for Stack
impl Unpin for Stack
impl UnwindSafe for Stack
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more