Esp8266IpNetworkDriver

Struct Esp8266IpNetworkDriver 

Source
pub struct Esp8266IpNetworkDriver<'a, Tx>
where Tx: Write<u8>,
{ /* private fields */ }
Expand description

Network driver based on the ESP8266 board

Trait Implementations§

Source§

impl<'a, Tx> Debug for Esp8266IpNetworkDriver<'a, Tx>
where Tx: Write<u8>,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, Tx> Dns for Esp8266IpNetworkDriver<'a, Tx>
where Tx: Write<u8>,

Source§

type Error = DnsError

The type returned when we have an error
Source§

fn gethostbyname( &self, hostname: &str, addr_type: AddrType, ) -> Result<HostAddr, Self::Error>

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

fn gethostbyaddr(&self, _addr: IpAddr) -> Result<String<U256>, Self::Error>

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

impl<'a, Tx> IpNetworkDriver for Esp8266IpNetworkDriver<'a, Tx>
where Tx: Write<u8>,

Source§

type TcpSocket = TcpSocket

Source§

type TcpError = TcpError

Source§

type DnsError = DnsError

Source§

fn tcp( &self, ) -> &dyn TcpStack<TcpSocket = Self::TcpSocket, Error = Self::TcpError>

Source§

fn dns(&self) -> &dyn Dns<Error = Self::DnsError>

Source§

impl<'a, Tx> TcpStack for Esp8266IpNetworkDriver<'a, Tx>
where Tx: Write<u8>,

Source§

type TcpSocket = TcpSocket

The type returned when we create a new TCP socket
Source§

type Error = TcpError

The type returned when we have an error
Source§

fn open(&self, mode: Mode) -> Result<Self::TcpSocket, Self::Error>

Open a new TCP socket. The socket starts in the unconnected state.
Source§

fn connect( &self, socket: Self::TcpSocket, remote: HostSocketAddr, ) -> Result<Self::TcpSocket, Self::Error>

Connect to the given remote host and port.
Source§

fn is_connected(&self, socket: &Self::TcpSocket) -> Result<bool, Self::Error>

Check if this socket is connected
Source§

fn write( &self, socket: &mut Self::TcpSocket, buffer: &[u8], ) -> Result<usize, Self::Error>

Write to the stream. Returns the number of bytes written is returned (which may be less than buffer.len()), or an error.
Source§

fn read( &self, socket: &mut Self::TcpSocket, buffer: &mut [u8], ) -> Result<usize, Self::Error>

Read from the stream. Returns Ok(n), which means n bytes of data have been received and they have been placed in &buffer[0..n], or an error.
Source§

fn close(&self, socket: Self::TcpSocket) -> Result<(), Self::Error>

Close an existing TCP socket.

Auto Trait Implementations§

§

impl<'a, Tx> !Freeze for Esp8266IpNetworkDriver<'a, Tx>

§

impl<'a, Tx> !RefUnwindSafe for Esp8266IpNetworkDriver<'a, Tx>

§

impl<'a, Tx> Send for Esp8266IpNetworkDriver<'a, Tx>
where Tx: Send,

§

impl<'a, Tx> !Sync for Esp8266IpNetworkDriver<'a, Tx>

§

impl<'a, Tx> Unpin for Esp8266IpNetworkDriver<'a, Tx>
where Tx: Unpin,

§

impl<'a, Tx> !UnwindSafe for Esp8266IpNetworkDriver<'a, Tx>

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, 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> Same for T

Source§

type Output = T

Should always be Self
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.