pub struct SendWaiter<'s>(/* private fields */);unstable only.Expand description
This struct is returned by a sync esp now send. Invoking wait method of
this struct will block current task until the callback function of esp now
send is called and return the status of previous sending.
This waiter borrows the sender, so when used in multiple tasks, the lock
will only be released when the waiter is dropped or consumed via wait.
When using a lock that disables interrupts, the waiter will block forever since the callback which signals the completion of sending will never be invoked.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Implementations§
Source§impl SendWaiter<'_>
impl SendWaiter<'_>
Sourcepub fn wait(self) -> Result<(), EspNowError>
pub fn wait(self) -> Result<(), EspNowError>
Wait for the previous sending to complete, i.e. the send callback is invoked with status of the sending.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.