pub struct MeshEndpoint { /* private fields */ }Expand description
The driver’s half: requests to carry, and outcomes to report.
Implementations§
Source§impl MeshEndpoint
impl MeshEndpoint
Sourcepub async fn next(&mut self) -> Option<MeshRequest>
pub async fn next(&mut self) -> Option<MeshRequest>
The next request to carry, or None once the link is dropped and
everything already queued has been handed over.
A request too large for one payload is refused here rather than reaching the exchange engine, so the caller sees the size it asked for named in the error.
Sourcepub fn deliver(&mut self, request: &MeshRequest, outcome: DeliveredOutcome<'_>)
pub fn deliver(&mut self, request: &MeshRequest, outcome: DeliveredOutcome<'_>)
Hand one exchange’s outcome back to the device handle.
Sourcepub fn refuse(&mut self, message: String)
pub fn refuse(&mut self, message: String)
Report that this request could not be carried, without ending the session.
For the failures that belong to one command rather than to the link — a request that ran out of patience, an engine that would not take it — where the next command may well succeed.
Auto Trait Implementations§
impl Freeze for MeshEndpoint
impl RefUnwindSafe for MeshEndpoint
impl Send for MeshEndpoint
impl Sync for MeshEndpoint
impl Unpin for MeshEndpoint
impl UnwindSafe for MeshEndpoint
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more