pub struct BackgroundTaskViewState {
pub tasks: HashMap<String, BackgroundTaskView>,
pub synced_at_ms: Option<u64>,
}Expand description
Lightweight cached task view stored on the owner thread for prompt injection. The canonical task state remains in the task thread.
Fields§
§tasks: HashMap<String, BackgroundTaskView>§synced_at_ms: Option<u64>Trait Implementations§
Source§impl Clone for BackgroundTaskViewState
impl Clone for BackgroundTaskViewState
Source§fn clone(&self) -> BackgroundTaskViewState
fn clone(&self) -> BackgroundTaskViewState
Returns a duplicate of the value. Read more
1.0.0 · 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 BackgroundTaskViewState
impl Debug for BackgroundTaskViewState
Source§impl Default for BackgroundTaskViewState
impl Default for BackgroundTaskViewState
Source§fn default() -> BackgroundTaskViewState
fn default() -> BackgroundTaskViewState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BackgroundTaskViewState
impl<'de> Deserialize<'de> for BackgroundTaskViewState
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 Serialize for BackgroundTaskViewState
impl Serialize for BackgroundTaskViewState
Source§impl State for BackgroundTaskViewState
impl State for BackgroundTaskViewState
Source§const PATH: &'static str = "__derived.background_tasks"
const PATH: &'static str = "__derived.background_tasks"
Canonical JSON path for this state type. Read more
Source§fn state_ref<'a>(
doc: &'a DocCell,
base: Path,
sink: PatchSink<'a>,
) -> Self::Ref<'a>
fn state_ref<'a>( doc: &'a DocCell, base: Path, sink: PatchSink<'a>, ) -> Self::Ref<'a>
Create a state reference at the specified path. Read more
Source§fn from_value(value: &Value) -> TireaResult<Self>
fn from_value(value: &Value) -> TireaResult<Self>
Deserialize this type from a JSON value.
Source§fn to_value(&self) -> TireaResult<Value>
fn to_value(&self) -> TireaResult<Value>
Serialize this type to a JSON value.
Source§fn diff_ops(old: &Self, new: &Self, base_path: &Path) -> TireaResult<Vec<Op>>
fn diff_ops(old: &Self, new: &Self, base_path: &Path) -> TireaResult<Vec<Op>>
Compare two instances and emit minimal ops for changed fields. Read more
Source§fn register_lattice(_registry: &mut LatticeRegistry)
fn register_lattice(_registry: &mut LatticeRegistry)
Register lattice fields into the given registry. Read more
Source§fn lattice_keys() -> &'static [&'static str]
fn lattice_keys() -> &'static [&'static str]
Return the JSON keys of fields annotated with
#[tirea(lattice)]. Read moreSource§impl StateSpec for BackgroundTaskViewState
impl StateSpec for BackgroundTaskViewState
Source§const SCOPE: StateScope = ::tirea_state::StateScope::Thread
const SCOPE: StateScope = ::tirea_state::StateScope::Thread
Lifecycle scope of this state type. Read more
Source§type Action = BackgroundTaskViewAction
type Action = BackgroundTaskViewAction
The action type accepted by this state.
Auto Trait Implementations§
impl Freeze for BackgroundTaskViewState
impl RefUnwindSafe for BackgroundTaskViewState
impl Send for BackgroundTaskViewState
impl Sync for BackgroundTaskViewState
impl Unpin for BackgroundTaskViewState
impl UnwindSafe for BackgroundTaskViewState
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