Struct esp_idf_svc::eth::AsyncEth

source ·
pub struct AsyncEth<T> { /* private fields */ }

Implementations§

source§

impl<T> AsyncEth<T>
where T: Eth<Error = EspError>,

source

pub fn wrap( eth: T, event_loop: EspSystemEventLoop, timer_service: EspTaskTimerService, ) -> Result<Self, EspError>

source

pub fn eth(&self) -> &T

source

pub fn eth_mut(&mut self) -> &mut T

source

pub fn is_started(&self) -> Result<bool, EspError>

source

pub fn is_connected(&self) -> Result<bool, EspError>

source

pub async fn start(&mut self) -> Result<(), EspError>

source

pub async fn stop(&mut self) -> Result<(), EspError>

source

pub async fn wait_connected(&mut self) -> Result<(), EspError>

source

pub async fn eth_wait_while<F: FnMut(&mut Self) -> Result<bool, EspError>>( &mut self, matcher: F, timeout: Option<Duration>, ) -> Result<(), EspError>

source§

impl<T> AsyncEth<T>
where T: NetifStatus,

source

pub fn is_up(&self) -> Result<bool, EspError>

source

pub async fn wait_netif_up(&mut self) -> Result<(), EspError>

source

pub async fn ip_wait_while<F: FnMut(&mut Self) -> Result<bool, EspError>>( &mut self, matcher: F, timeout: Option<Duration>, ) -> Result<(), EspError>

Trait Implementations§

source§

impl<T> Eth for AsyncEth<T>
where T: Eth<Error = EspError>,

§

type Error = <T as Eth>::Error

source§

async fn start(&mut self) -> Result<(), Self::Error>

source§

async fn stop(&mut self) -> Result<(), Self::Error>

source§

async fn is_started(&self) -> Result<bool, Self::Error>

source§

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

source§

impl<T> NetifStatus for AsyncEth<T>
where T: NetifStatus,

source§

async fn is_up(&self) -> Result<bool, EspError>

Auto Trait Implementations§

§

impl<T> Freeze for AsyncEth<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for AsyncEth<T>
where T: RefUnwindSafe,

§

impl<T> Send for AsyncEth<T>
where T: Send,

§

impl<T> Sync for AsyncEth<T>
where T: Sync,

§

impl<T> Unpin for AsyncEth<T>
where T: Unpin,

§

impl<T> UnwindSafe for AsyncEth<T>
where T: UnwindSafe,

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.