pub struct StoredTask {
pub id: String,
pub space: Space,
pub operation: String,
pub arguments: Value,
pub state: TaskState,
pub status: Option<String>,
pub created_at: SystemTime,
pub updated_at: SystemTime,
pub version: u64,
}Expand description
One task, as stored. Serializable so a store can keep it as JSON.
Fields§
§id: String§space: SpaceWhose task it is: only the same space may read or cancel it.
operation: String§arguments: ValueThe operation’s arguments, to run it again with the user’s answers when it asked for input.
state: TaskState§status: Option<String>What the operation last reported while working.
created_at: SystemTime§updated_at: SystemTime§version: u64Incremented by every write, so that concurrent writers (a task finishing while it is cancelled, on one instance or several) cannot overwrite each other unseen.
Trait Implementations§
Source§impl Clone for StoredTask
impl Clone for StoredTask
Source§impl Debug for StoredTask
impl Debug for StoredTask
Source§impl<'de> Deserialize<'de> for StoredTask
impl<'de> Deserialize<'de> for StoredTask
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StoredTask
impl PartialEq for StoredTask
Source§impl Serialize for StoredTask
impl Serialize for StoredTask
impl StructuralPartialEq for StoredTask
Auto Trait Implementations§
impl Forget for StoredTask
impl Freeze for StoredTask
impl RefUnwindSafe for StoredTask
impl Send for StoredTask
impl Sync for StoredTask
impl Unpin for StoredTask
impl UnsafeUnpin for StoredTask
impl UnwindSafe for StoredTask
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