pub struct HeldVersion { /* private fields */ }Expand description
One task’s write held to the version its caller read.
Implementations§
Source§impl HeldVersion
impl HeldVersion
Sourcepub async fn scope<F: Future>(held: Arc<Self>, call: F) -> F::Output
pub async fn scope<F: Future>(held: Arc<Self>, call: F) -> F::Output
Run call with this hold answering every HeldVersion::expected made inside it.
Sourcepub fn expected(id: &NativeId) -> Option<String>
pub fn expected(id: &NativeId) -> Option<String>
The version the write in progress holds the task id to — None when no write in
progress is held, or the one that is holds another task.
Sourcepub fn moved(id: &NativeId, found: Option<String>) -> SourceError
pub fn moved(id: &NativeId, found: Option<String>) -> SourceError
Refuse the write in progress of the task id, which the source found at found rather
than at the version it is held to: the refusal the source fails its call with, writing
nothing, recorded so the engine reports it as the version having moved.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HeldVersion
impl Forget for HeldVersion
impl Move for HeldVersion
impl RefUnwindSafe for HeldVersion
impl Send for HeldVersion
impl Sync for HeldVersion
impl Unpin for HeldVersion
impl UnsafeUnpin for HeldVersion
impl UnwindSafe for HeldVersion
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