Struct std_embedded_nal::Stack [−][src]
The operating system's network stack, implementing embedded_nal::UdpStack
and others.
This is most easily accessed using the static STACK
instance.
The stack can be cloned, as it is not a resource that needs any synchronization. This is not
made implicit as Copy, though (although there's not technical reason not to). That is to alert
users to the difficulties that'd arise when taking ownership of a stack rather than just using
it through a shared reference (which is generally possible in embedded_nal
).
Trait Implementations
impl Clone for Stack
[src]
impl Dns for Stack
[src]
type Error = Error
The type returned when we have an error
fn gethostbyname(&self, hostname: &str, addr_type: AddrType) -> Result<IpAddr>
[src]
fn gethostbyaddr(&self, _addr: IpAddr) -> Result<String<U256>>
[src]
impl TcpClient for Stack
[src]
type TcpSocket = TcpSocket
The type returned when we create a new TCP socket
type Error = Error
The type returned when we have an error
fn socket(&self) -> Result<TcpSocket>
[src]
fn connect(
&self,
socket: &mut TcpSocket,
remote: SocketAddr
) -> Result<(), Self::Error>
[src]
&self,
socket: &mut TcpSocket,
remote: SocketAddr
) -> Result<(), Self::Error>
fn is_connected(&self, socket: &TcpSocket) -> Result<bool>
[src]
fn send(
&self,
socket: &mut TcpSocket,
buffer: &[u8]
) -> Result<usize, Self::Error>
[src]
&self,
socket: &mut TcpSocket,
buffer: &[u8]
) -> Result<usize, Self::Error>
fn receive(
&self,
socket: &mut TcpSocket,
buffer: &mut [u8]
) -> Result<usize, Self::Error>
[src]
&self,
socket: &mut TcpSocket,
buffer: &mut [u8]
) -> Result<usize, Self::Error>
fn close(&self, _: TcpSocket) -> Result<()>
[src]
impl UdpClient for Stack
[src]
type UdpSocket = UdpSocket
The type returned when we create a new UDP socket
type Error = Error
The type returned when we have an error
fn socket(&self) -> Result<Self::UdpSocket, Self::Error>
[src]
fn connect(
&self,
socket: &mut Self::UdpSocket,
remote: SocketAddr
) -> Result<()>
[src]
&self,
socket: &mut Self::UdpSocket,
remote: SocketAddr
) -> Result<()>
fn send(
&self,
socket: &mut Self::UdpSocket,
buffer: &[u8]
) -> Result<(), Self::Error>
[src]
&self,
socket: &mut Self::UdpSocket,
buffer: &[u8]
) -> Result<(), Self::Error>
fn receive(
&self,
socket: &mut Self::UdpSocket,
buffer: &mut [u8]
) -> Result<(usize, SocketAddr), Self::Error>
[src]
&self,
socket: &mut Self::UdpSocket,
buffer: &mut [u8]
) -> Result<(usize, SocketAddr), Self::Error>
fn close(&self, _: Self::UdpSocket) -> Result<()>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Stack
[src]
impl Send for Stack
[src]
impl Sync for Stack
[src]
impl Unpin for Stack
[src]
impl UnwindSafe for Stack
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,