[−][src]Struct std_embedded_nal::Stack
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, Self::Error>
[src]
&self,
hostname: &str,
addr_type: AddrType
) -> Result<IpAddr, Self::Error>
fn gethostbyaddr(&self, _addr: IpAddr) -> Result<String<U256>, Self::Error>
[src]
impl TcpStack 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 open(&self, mode: Mode) -> Result<TcpSocket>
[src]
fn connect(&self, socket: TcpSocket, remote: SocketAddr) -> Result<TcpSocket>
[src]
fn is_connected(&self, socket: &TcpSocket) -> Result<bool, Self::Error>
[src]
fn write(
&self,
socket: &mut TcpSocket,
buffer: &[u8]
) -> Result<usize, Error<Error>>
[src]
&self,
socket: &mut TcpSocket,
buffer: &[u8]
) -> Result<usize, Error<Error>>
fn read(
&self,
socket: &mut TcpSocket,
buffer: &mut [u8]
) -> Result<usize, Error<Error>>
[src]
&self,
socket: &mut TcpSocket,
buffer: &mut [u8]
) -> Result<usize, Error<Error>>
fn close(&self, _: TcpSocket) -> Result<(), Error>
[src]
impl UdpStack 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 open(&self, remote: SocketAddr, mode: Mode) -> Result<UdpSocket>
[src]
fn write(
&self,
socket: &mut UdpSocket,
buffer: &[u8]
) -> Result<(), Error<Error>>
[src]
&self,
socket: &mut UdpSocket,
buffer: &[u8]
) -> Result<(), Error<Error>>
fn read(
&self,
socket: &mut UdpSocket,
buffer: &mut [u8]
) -> Result<usize, Error<Error>>
[src]
&self,
socket: &mut UdpSocket,
buffer: &mut [u8]
) -> Result<usize, Error<Error>>
fn close(&self, _: UdpSocket) -> Result<(), Error>
[src]
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
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,