pub struct CacheIoSubmission<Task, Output> {
pub ticket: CacheIoTicket<Output>,
pub joined: bool,
/* private fields */
}Expand description
Prepared cache I/O that admits physical work only when explicitly enqueued.
Fields§
§ticket: CacheIoTicket<Output>Ticket shared by the operation owner and all exact-key joiners.
joined: boolWhether this submission joined an already prepared exact operation.
Implementations§
Source§impl<Task, Output: Clone> CacheIoSubmission<Task, Output>
impl<Task, Output: Clone> CacheIoSubmission<Task, Output>
Sourcepub fn joined_task_mut(&mut self) -> Option<&mut Task>
pub fn joined_task_mut(&mut self) -> Option<&mut Task>
Returns the unused backend task when this submission joined existing work.
Backends may disarm task-local rollback guards before the unused task is dropped; the task is never physically executed.
Sourcepub fn enqueue(self) -> Result<CacheIoSubmissionOutcome, CacheIoWorkerError>
pub fn enqueue(self) -> Result<CacheIoSubmissionOutcome, CacheIoWorkerError>
Admits this prepared task, blocking only on finite queue capacity.
Trait Implementations§
Source§impl<Task, Output> Drop for CacheIoSubmission<Task, Output>
impl<Task, Output> Drop for CacheIoSubmission<Task, Output>
Auto Trait Implementations§
impl<Task, Output> Freeze for CacheIoSubmission<Task, Output>
impl<Task, Output> RefUnwindSafe for CacheIoSubmission<Task, Output>where
CacheIoTicket<Output>: RefUnwindSafe,
Sender<CacheIoWorkerRequest<Task, Output>>: RefUnwindSafe,
Arc<CacheIoWorkerShared<Output>>: RefUnwindSafe,
Option<CacheIoWorkerRequest<Task, Output>>: RefUnwindSafe,
Option<Task>: RefUnwindSafe,
impl<Task, Output> Send for CacheIoSubmission<Task, Output>
impl<Task, Output> Sync for CacheIoSubmission<Task, Output>
impl<Task, Output> Unpin for CacheIoSubmission<Task, Output>
impl<Task, Output> UnsafeUnpin for CacheIoSubmission<Task, Output>where
CacheIoTicket<Output>: UnsafeUnpin,
Sender<CacheIoWorkerRequest<Task, Output>>: UnsafeUnpin,
Arc<CacheIoWorkerShared<Output>>: UnsafeUnpin,
Option<CacheIoWorkerRequest<Task, Output>>: UnsafeUnpin,
Option<Task>: UnsafeUnpin,
impl<Task, Output> UnwindSafe for CacheIoSubmission<Task, Output>where
CacheIoTicket<Output>: UnwindSafe,
Sender<CacheIoWorkerRequest<Task, Output>>: UnwindSafe,
Arc<CacheIoWorkerShared<Output>>: UnwindSafe,
Option<CacheIoWorkerRequest<Task, Output>>: UnwindSafe,
Option<Task>: UnwindSafe,
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