Enum viceroy_lib::session::PeekableTask
source · pub enum PeekableTask<T> {
Waiting(Receiver<Result<T, Error>>),
Complete(Result<T, Error>),
}
Variants§
Implementations§
source§impl<T: Send + 'static> PeekableTask<T>
impl<T: Send + 'static> PeekableTask<T>
pub async fn spawn( fut: impl Future<Output = Result<T, Error>> + 'static + Send ) -> Self
pub fn complete(t: T) -> Self
sourcepub async fn await_ready(&mut self)
pub async fn await_ready(&mut self)
Block until a response is ready.
pub async fn recv(self) -> Result<T, Error>
pub fn get_mut(&mut self) -> Option<&mut Result<T, Error>>
Trait Implementations§
source§impl<T: Debug> Debug for PeekableTask<T>
impl<T: Debug> Debug for PeekableTask<T>
Auto Trait Implementations§
impl<T> Freeze for PeekableTask<T>where
T: Freeze,
impl<T> !RefUnwindSafe for PeekableTask<T>
impl<T> Send for PeekableTask<T>where
T: Send,
impl<T> Sync for PeekableTask<T>
impl<T> Unpin for PeekableTask<T>where
T: Unpin,
impl<T> !UnwindSafe for PeekableTask<T>
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
source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read more