Adapter

Struct Adapter 

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

Implementations§

Source§

impl<'a, Tx> Adapter<'a, Tx>
where Tx: Write<u8>,

Source

pub fn get_firmware_info(&mut self) -> Result<FirmwareInfo, ()>

Retrieve the firmware version for the adapter.

Source

pub fn get_ip_address(&mut self) -> Result<IpAddresses, ()>

Get the board’s IP address. Only valid if connected to an access-point.

Source

pub fn set_mode(&mut self, mode: WiFiMode) -> Result<(), ()>

Set the mode of the Wi-Fi stack

Must be done before joining an access point.

Source

pub fn join<'c>( &mut self, ssid: &'c str, password: &'c str, ) -> Result<(), WifiConnectionFailure>

Join a wifi access-point.

The board will expect to obtain an IP address from DHCP.

  • ssid: The access-point’s SSID to join
  • password: The password for the access-point.
Source

pub fn query_dns_resolvers(&mut self) -> Result<ResolverAddresses, ()>

Source

pub fn set_dns_resolvers( &mut self, resolver1: Ipv4Addr, resolver2: Option<Ipv4Addr>, ) -> Result<(), ()>

Source

pub fn into_network_stack(self) -> Esp8266IpNetworkDriver<'a, Tx>

Consume the adapter and produce a NetworkStack.

Trait Implementations§

Source§

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

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, Tx> Freeze for Adapter<'a, Tx>
where Tx: Freeze,

§

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

§

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

§

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

§

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

§

impl<'a, Tx> !UnwindSafe for Adapter<'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.