#[non_exhaustive]pub enum TaskState {
Submitted,
Working,
Completed,
Failed,
Canceled,
InputRequired,
Rejected,
AuthRequired,
}Expand description
A2A task states — type-safe wrapper over proto TaskState.
Excludes UNSPECIFIED which is not a valid application state.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl TaskState
impl TaskState
Sourcepub fn can_transition_to(&self, next: TaskState) -> bool
pub fn can_transition_to(&self, next: TaskState) -> bool
Returns whether transitioning from self to next is valid per the A2A spec.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true if this is a terminal state (no further transitions allowed).
Trait Implementations§
impl Copy for TaskState
impl Eq for TaskState
impl StructuralPartialEq for TaskState
Auto Trait Implementations§
impl Freeze for TaskState
impl RefUnwindSafe for TaskState
impl Send for TaskState
impl Sync for TaskState
impl Unpin for TaskState
impl UnsafeUnpin for TaskState
impl UnwindSafe for TaskState
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