pub struct TaskAction {
pub task: u64,
pub actions: Vec<TaskVerb>,
}Expand description
The structured part of a task notice (TASK_ACTION_KEY).
Fields§
§task: u64The task number (of the project’s vault, or its local tasks).
actions: Vec<TaskVerb>What may be done with it, show first.
Implementations§
Source§impl TaskAction
impl TaskAction
pub fn new(task: u64, actions: &[TaskVerb]) -> Self
Sourcepub fn call(&self) -> String
pub fn call(&self) -> String
The exact ctx_tasks call(s) for an agent, e.g.
ctx_tasks action=show number=7, then action=claim number=7.
Invariant: the call (the next: line ctx_agent action=read shows)
is built ONLY from the task number (u64) and the known
TaskVerbs, never from message text or any other string.
Sourcepub fn of(entry: &ScratchpadEntry) -> Option<Self>
pub fn of(entry: &ScratchpadEntry) -> Option<Self>
The action a bus entry carries, if any (an unreadable one: none).
Only the two task-notice senders (SENDER for Cloud task events,
crate::tasks::local::SENDER for local tasks) carry one: the same
metadata on any other sender’s entry is ignored, so no agent can
make read show another agent a next: call.
Sourcepub fn attach(&self, registry: &mut AgentRegistry, id: &str)
pub fn attach(&self, registry: &mut AgentRegistry, id: &str)
Store this action on the bus entry id of registry.
Trait Implementations§
Source§impl Clone for TaskAction
impl Clone for TaskAction
Source§impl Debug for TaskAction
impl Debug for TaskAction
Source§impl<'de> Deserialize<'de> for TaskAction
impl<'de> Deserialize<'de> for TaskAction
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>,
impl Eq for TaskAction
Source§impl PartialEq for TaskAction
impl PartialEq for TaskAction
Source§impl Serialize for TaskAction
impl Serialize for TaskAction
impl StructuralPartialEq for TaskAction
Auto Trait Implementations§
impl Forget for TaskAction
impl Freeze for TaskAction
impl Move for TaskAction
impl RefUnwindSafe for TaskAction
impl Send for TaskActionwhere
RawVecInner: Send,
impl Sync for TaskActionwhere
RawVecInner: Sync,
impl Unpin for TaskAction
impl UnsafeUnpin for TaskAction
impl UnwindSafe for TaskActionwhere
RawVecInner: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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