pub struct VersionedTask {
pub task: Task,
pub version: u64,
}Expand description
A task paired with its storage version — the optimistic-concurrency token.
The version is a monotonic counter the storage adapter bumps on every
successful mutation of the task. A caller reads a task and its version, then
passes that version back on a conditional update
(AsyncTaskVersioning::update_status_checked);
if another writer advanced the task in between, the update fails with
A2AError::VersionConflict instead
of silently clobbering it.
Fields§
§task: TaskThe task at this version.
version: u64The storage version this snapshot was read or written at.
Implementations§
Trait Implementations§
Source§impl Clone for VersionedTask
impl Clone for VersionedTask
Source§fn clone(&self) -> VersionedTask
fn clone(&self) -> VersionedTask
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VersionedTask
impl Debug for VersionedTask
Source§impl PartialEq for VersionedTask
impl PartialEq for VersionedTask
Source§fn eq(&self, other: &VersionedTask) -> bool
fn eq(&self, other: &VersionedTask) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VersionedTask
Auto Trait Implementations§
impl !Freeze for VersionedTask
impl RefUnwindSafe for VersionedTask
impl Send for VersionedTask
impl Sync for VersionedTask
impl Unpin for VersionedTask
impl UnsafeUnpin for VersionedTask
impl UnwindSafe for VersionedTask
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more