Struct Stack

Source
pub struct Stack(/* private fields */);

Implementations§

Source§

impl Stack

Source

pub const fn new() -> Self

Trait Implementations§

Source§

impl Default for Stack

Source§

fn default() -> Stack

Returns the “default value” for a type. Read more
Source§

impl Dns for Stack

Source§

type Error = Error

The type returned when we have an error
Source§

async fn get_host_by_name( &self, host: &str, addr_type: AddrType, ) -> Result<IpAddr, Self::Error>

Resolve the first ip address of a host, given its hostname and a desired address record type to look for
Source§

async fn get_host_by_address( &self, _addr: IpAddr, _result: &mut [u8], ) -> Result<usize, Self::Error>

Resolve the hostname of a host, given its ip address. Read more
Source§

impl RawStack for Stack

Source§

type Error = Error

Source§

type Socket = StdRawSocket

Source§

async fn bind(&self, interface: u32) -> Result<Self::Socket, Self::Error>

Source§

impl TcpConnect for Stack

Source§

type Error = Error

Error type returned on connect failure.
Source§

type Connection<'a> = StdTcpConnection where Self: 'a

Type holding state of a TCP connection. Should close the connection when dropped.
Source§

async fn connect( &self, remote: SocketAddr, ) -> Result<Self::Connection<'_>, Self::Error>

Connect to the given remote host and port. Read more
Source§

impl TcpListen for Stack

Source§

type Error = Error

Source§

type Acceptor<'m> = StdTcpAccept where Self: 'm

Source§

async fn listen( &self, remote: SocketAddr, ) -> Result<Self::Acceptor<'_>, Self::Error>

Source§

impl UdpStack for Stack

Source§

type Error = Error

Error type returned on socket creation failure.
Source§

type Connected = StdUdpSocket

Eventual socket return type of the [.connect()] method
Source§

type UniquelyBound = StdUdpSocket

Eventual socket return type of the [.bind_single()] method
Source§

type MultiplyBound = StdUdpSocket

Eventual return type of the [.bind_multiple()] method
Source§

async fn connect_from( &self, local: SocketAddr, remote: SocketAddr, ) -> Result<(SocketAddr, Self::Connected), Self::Error>

Create a socket that has a fixed remote address. Read more
Source§

async fn bind_single( &self, local: SocketAddr, ) -> Result<(SocketAddr, Self::UniquelyBound), Self::Error>

Create a socket that has a fixed local address. Read more
Source§

async fn bind_multiple( &self, _local: SocketAddr, ) -> Result<Self::MultiplyBound, Self::Error>

Create a socket that has no single fixed local address. Read more
Source§

async fn connect( &self, remote: SocketAddr, ) -> Result<(SocketAddr, Self::Connected), Self::Error>

Create a socket that has a fixed remote address. Read more

Auto Trait Implementations§

§

impl Freeze for Stack

§

impl RefUnwindSafe for Stack

§

impl Send for Stack

§

impl Sync for Stack

§

impl Unpin for Stack

§

impl UnwindSafe for Stack

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more