Struct embedded_nal::SharedStack [−][src]
pub struct SharedStack<'a, T> { /* fields omitted */ }Expand description
Single-thread shared reference to an internal network stack implementation.
This can only be created by calling SharableStack::acquire()
Trait Implementations
impl<'a, T> TcpClientStack for SharedStack<'a, T> where
T: TcpClientStack, [src]
impl<'a, T> TcpClientStack for SharedStack<'a, T> where
T: TcpClientStack, [src]fn socket(&mut self) -> Result<Self::TcpSocket, Self::Error>[src]
fn socket(&mut self) -> Result<Self::TcpSocket, Self::Error>[src]Open a socket for usage as a TCP client. Read more
fn connect(
&mut self,
socket: &mut Self::TcpSocket,
address: SocketAddr
) -> Result<(), Error<<T as TcpClientStack>::Error>>[src]
fn connect(
&mut self,
socket: &mut Self::TcpSocket,
address: SocketAddr
) -> Result<(), Error<<T as TcpClientStack>::Error>>[src]Connect to the given remote host and port. Read more
fn send(
&mut self,
socket: &mut Self::TcpSocket,
data: &[u8]
) -> Result<usize, Error<<T as TcpClientStack>::Error>>[src]
fn send(
&mut self,
socket: &mut Self::TcpSocket,
data: &[u8]
) -> Result<usize, Error<<T as TcpClientStack>::Error>>[src]Write to the stream. Read more
fn receive(
&mut self,
socket: &mut Self::TcpSocket,
data: &mut [u8]
) -> Result<usize, Error<<T as TcpClientStack>::Error>>[src]
fn receive(
&mut self,
socket: &mut Self::TcpSocket,
data: &mut [u8]
) -> Result<usize, Error<<T as TcpClientStack>::Error>>[src]Receive data from the stream. Read more
fn is_connected(
&mut self,
socket: &Self::TcpSocket
) -> Result<bool, Self::Error>[src]
fn is_connected(
&mut self,
socket: &Self::TcpSocket
) -> Result<bool, Self::Error>[src]Check if this socket is connected
impl<'a, T> TcpFullStack for SharedStack<'a, T> where
T: TcpFullStack, [src]
impl<'a, T> TcpFullStack for SharedStack<'a, T> where
T: TcpFullStack, [src]fn bind(
&mut self,
socket: &mut Self::TcpSocket,
port: u16
) -> Result<(), <T as TcpClientStack>::Error>[src]
fn bind(
&mut self,
socket: &mut Self::TcpSocket,
port: u16
) -> Result<(), <T as TcpClientStack>::Error>[src]Create a new TCP socket and bind it to the specified local port. Read more
fn listen(
&mut self,
socket: &mut Self::TcpSocket
) -> Result<(), <T as TcpClientStack>::Error>[src]
fn listen(
&mut self,
socket: &mut Self::TcpSocket
) -> Result<(), <T as TcpClientStack>::Error>[src]Begin listening for connection requests on a previously-bound socket. Read more
fn accept(
&mut self,
socket: &mut Self::TcpSocket
) -> Result<(<T as TcpClientStack>::TcpSocket, SocketAddr), Error<<T as TcpClientStack>::Error>>[src]
fn accept(
&mut self,
socket: &mut Self::TcpSocket
) -> Result<(<T as TcpClientStack>::TcpSocket, SocketAddr), Error<<T as TcpClientStack>::Error>>[src]Accept an active connection request on a listening socket. Read more
impl<'a, T> UdpClientStack for SharedStack<'a, T> where
T: UdpClientStack, [src]
impl<'a, T> UdpClientStack for SharedStack<'a, T> where
T: UdpClientStack, [src]fn connect(
&mut self,
socket: &mut Self::UdpSocket,
address: SocketAddr
) -> Result<(), Self::Error>[src]
fn connect(
&mut self,
socket: &mut Self::UdpSocket,
address: SocketAddr
) -> Result<(), Self::Error>[src]Connect a UDP socket with a peer using a dynamically selected port. Read more
fn send(
&mut self,
socket: &mut Self::UdpSocket,
data: &[u8]
) -> Result<(), Error<<T as UdpClientStack>::Error>>[src]
fn send(
&mut self,
socket: &mut Self::UdpSocket,
data: &[u8]
) -> Result<(), Error<<T as UdpClientStack>::Error>>[src]Send a datagram to the remote host. Read more
fn receive(
&mut self,
socket: &mut Self::UdpSocket,
data: &mut [u8]
) -> Result<(usize, SocketAddr), Error<<T as UdpClientStack>::Error>>[src]
fn receive(
&mut self,
socket: &mut Self::UdpSocket,
data: &mut [u8]
) -> Result<(usize, SocketAddr), Error<<T as UdpClientStack>::Error>>[src]Read a datagram the remote host has sent to us. Read more
impl<'a, T> UdpFullStack for SharedStack<'a, T> where
T: UdpFullStack, [src]
impl<'a, T> UdpFullStack for SharedStack<'a, T> where
T: UdpFullStack, [src]fn bind(
&mut self,
socket: &mut Self::UdpSocket,
local_port: u16
) -> Result<(), Self::Error>[src]
fn bind(
&mut self,
socket: &mut Self::UdpSocket,
local_port: u16
) -> Result<(), Self::Error>[src]Bind a UDP socket with a specified port
fn send_to(
&mut self,
socket: &mut Self::UdpSocket,
remote: SocketAddr,
buffer: &[u8]
) -> Result<(), Error<<T as UdpClientStack>::Error>>[src]
fn send_to(
&mut self,
socket: &mut Self::UdpSocket,
remote: SocketAddr,
buffer: &[u8]
) -> Result<(), Error<<T as UdpClientStack>::Error>>[src]Send a packet to a remote host/port.