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§
Source§type TcpSocket = <T as TcpClientStack>::TcpSocket
type TcpSocket = <T as TcpClientStack>::TcpSocket
The type returned when we create a new TCP socket
Source§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
Source§type Error = <T as UdpClientStack>::Error
type Error = <T as UdpClientStack>::Error
The type returned when we have an error
Source§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