pub struct CommandReceiver(/* private fields */);Expand description
Single renderer consumer of typed request pointers.
Every returned Arc is the pointer enqueued by the transport. Receiving does not copy the method, path or JSON body.
Implementations§
Source§impl CommandReceiver
impl CommandReceiver
Sourcepub fn try_recv(&self) -> Result<Arc<ControlRequest>, TryRecvError>
pub fn try_recv(&self) -> Result<Arc<ControlRequest>, TryRecvError>
Take a queued request without waiting.
Sourcepub async fn recv(&self) -> Result<Arc<ControlRequest>, TryRecvError>
pub async fn recv(&self) -> Result<Arc<ControlRequest>, TryRecvError>
Await one request. Only one receive future may wait at a time.
Sourcepub fn recv_timeout(
&self,
timeout: Duration,
) -> Result<Arc<ControlRequest>, RecvTimeoutError>
pub fn recv_timeout( &self, timeout: Duration, ) -> Result<Arc<ControlRequest>, RecvTimeoutError>
Blocking adapter for an existing headless renderer entry point.
Trait Implementations§
Source§impl Drop for CommandReceiver
impl Drop for CommandReceiver
Auto Trait Implementations§
impl Forget for CommandReceiver
impl Freeze for CommandReceiver
impl Move for CommandReceiver
impl RefUnwindSafe for CommandReceiver
impl Send for CommandReceiver
impl Sync for CommandReceiver
impl Unpin for CommandReceiver
impl UnsafeUnpin for CommandReceiver
impl UnwindSafe for CommandReceiver
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