Struct embedded_nal::SharedStack
source · pub struct SharedStack<'a, T> { /* private fields */ }
Expand description
Single-thread shared reference to an internal network stack implementation.
This can only be created by calling SharableStack::acquire()
Trait Implementations§
§type TcpSocket = <T as TcpClientStack>::TcpSocket
type TcpSocket = <T as TcpClientStack>::TcpSocket
The type returned when we create a new TCP socket
§type Error = <T as TcpClientStack>::Error
type Error = <T as TcpClientStack>::Error
The type returned when we have an error
source§fn socket(&mut self) -> Result<Self::TcpSocket, Self::Error>
fn socket(&mut self) -> Result<Self::TcpSocket, Self::Error>
Open a socket for usage as a TCP client. Read more
source§fn connect(
&mut self,
socket: &mut Self::TcpSocket,
address: SocketAddr
) -> Result<(), Error<<T as TcpClientStack>::Error>>
fn connect( &mut self, socket: &mut Self::TcpSocket, address: SocketAddr ) -> Result<(), Error<<T as TcpClientStack>::Error>>
Connect to the given remote host and port. Read more
source§fn send(
&mut self,
socket: &mut Self::TcpSocket,
data: &[u8]
) -> Result<usize, Error<<T as TcpClientStack>::Error>>
fn send( &mut self, socket: &mut Self::TcpSocket, data: &[u8] ) -> Result<usize, Error<<T as TcpClientStack>::Error>>
Write to the stream. Read more
source§fn bind(
&mut self,
socket: &mut Self::TcpSocket,
port: u16
) -> Result<(), <T as TcpClientStack>::Error>
fn bind( &mut self, socket: &mut Self::TcpSocket, port: u16 ) -> Result<(), <T as TcpClientStack>::Error>
Create a new TCP socket and bind it to the specified local port. Read more
source§fn listen(
&mut self,
socket: &mut Self::TcpSocket
) -> Result<(), <T as TcpClientStack>::Error>
fn listen( &mut self, socket: &mut Self::TcpSocket ) -> Result<(), <T as TcpClientStack>::Error>
Begin listening for connection requests on a previously-bound socket. Read more
source§fn accept(
&mut self,
socket: &mut Self::TcpSocket
) -> Result<(<T as TcpClientStack>::TcpSocket, SocketAddr), Error<<T as TcpClientStack>::Error>>
fn accept( &mut self, socket: &mut Self::TcpSocket ) -> Result<(<T as TcpClientStack>::TcpSocket, SocketAddr), Error<<T as TcpClientStack>::Error>>
Accept an active connection request on a listening socket. Read more
§type Error = <T as UdpClientStack>::Error
type Error = <T as UdpClientStack>::Error
The type returned when we have an error
§type UdpSocket = <T as UdpClientStack>::UdpSocket
type UdpSocket = <T as UdpClientStack>::UdpSocket
The type returned when we create a new UDP socket
source§fn socket(&mut self) -> Result<Self::UdpSocket, Self::Error>
fn socket(&mut self) -> Result<Self::UdpSocket, Self::Error>
Allocate a socket for further use.
source§fn connect(
&mut self,
socket: &mut Self::UdpSocket,
address: SocketAddr
) -> Result<(), Self::Error>
fn connect( &mut self, socket: &mut Self::UdpSocket, address: SocketAddr ) -> Result<(), Self::Error>
Connect a UDP socket with a peer using a dynamically selected port. Read more
source§fn send(
&mut self,
socket: &mut Self::UdpSocket,
data: &[u8]
) -> Result<(), Error<<T as UdpClientStack>::Error>>
fn send( &mut self, socket: &mut Self::UdpSocket, data: &[u8] ) -> Result<(), Error<<T as UdpClientStack>::Error>>
Send a datagram to the remote host. Read more
Auto Trait Implementations§
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