pub struct ToolProgressState {
pub progress: f64,
pub total: Option<f64>,
pub message: Option<String>,
}Expand description
Canonical activity state shape for tool progress updates.
Fields§
§progress: f64Normalized progress value.
total: Option<f64>Optional absolute total if the source has one.
message: Option<String>Optional human-readable progress message.
Trait Implementations§
Source§impl Clone for ToolProgressState
impl Clone for ToolProgressState
Source§fn clone(&self) -> ToolProgressState
fn clone(&self) -> ToolProgressState
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 ToolProgressState
impl Debug for ToolProgressState
Source§impl Default for ToolProgressState
impl Default for ToolProgressState
Source§fn default() -> ToolProgressState
fn default() -> ToolProgressState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolProgressState
impl<'de> Deserialize<'de> for ToolProgressState
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 ToolProgressState
impl Serialize for ToolProgressState
Source§impl State for ToolProgressState
impl State for ToolProgressState
Source§type Ref<'a> = ToolProgressStateRef<'a>
type Ref<'a> = ToolProgressStateRef<'a>
The reference type that provides typed access.
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 moreAuto Trait Implementations§
impl Freeze for ToolProgressState
impl RefUnwindSafe for ToolProgressState
impl Send for ToolProgressState
impl Sync for ToolProgressState
impl Unpin for ToolProgressState
impl UnsafeUnpin for ToolProgressState
impl UnwindSafe for ToolProgressState
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