pub struct ReadExchange<'a> { /* private fields */ }Expand description
A one-shot read with a bound callback listener.
Implementations§
Source§impl ReadExchange<'_>
impl ReadExchange<'_>
Sourcepub fn local_addr(&self) -> Result<SocketAddr>
pub fn local_addr(&self) -> Result<SocketAddr>
The bound callback address, including the port the operating system assigned.
Sourcepub async fn read(
self,
timestamp: i64,
window: ProfileWindow,
on_rejected: impl FnMut(&Error),
) -> Result<ReadOutcome>
pub async fn read( self, timestamp: i64, window: ProfileWindow, on_rejected: impl FnMut(&Error), ) -> Result<ReadOutcome>
Dispatch a signed wake-up and request one profile over the gateway’s callback. The twelve-second network deadline covers all callback attempts and the read. A rejected handshake is reported to the caller and leaves the read pending.
Auto Trait Implementations§
impl<'a> !Freeze for ReadExchange<'a>
impl<'a> RefUnwindSafe for ReadExchange<'a>
impl<'a> Send for ReadExchange<'a>
impl<'a> Sync for ReadExchange<'a>
impl<'a> Unpin for ReadExchange<'a>
impl<'a> UnsafeUnpin for ReadExchange<'a>
impl<'a> UnwindSafe for ReadExchange<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more