pub struct ToolProgressStateRef<'a> { /* private fields */ }Expand description
Typed state reference for reading and writing state.
All modifications are automatically collected by the associated PatchSink.
Implementations§
Source§impl<'a> ToolProgressStateRef<'a>
impl<'a> ToolProgressStateRef<'a>
Sourcepub fn progress(&self) -> TireaResult<f64>
pub fn progress(&self) -> TireaResult<f64>
Read the field value.
Sourcepub fn total(&self) -> TireaResult<Option<f64>>
pub fn total(&self) -> TireaResult<Option<f64>>
Read the optional field value.
Sourcepub fn message(&self) -> TireaResult<Option<String>>
pub fn message(&self) -> TireaResult<Option<String>>
Read the optional field value.
Sourcepub fn set_progress(&self, value: f64) -> TireaResult<()>
pub fn set_progress(&self, value: f64) -> TireaResult<()>
Set the field value.
Sourcepub fn total_none(&self) -> TireaResult<()>
pub fn total_none(&self) -> TireaResult<()>
Set the optional field to null (None).
Sourcepub fn set_message(&self, value: Option<String>) -> TireaResult<()>
pub fn set_message(&self, value: Option<String>) -> TireaResult<()>
Set the optional field value.
Sourcepub fn message_none(&self) -> TireaResult<()>
pub fn message_none(&self) -> TireaResult<()>
Set the optional field to null (None).
Sourcepub fn delete_progress(&self) -> TireaResult<()>
pub fn delete_progress(&self) -> TireaResult<()>
Delete this field entirely from the object.
Sourcepub fn delete_total(&self) -> TireaResult<()>
pub fn delete_total(&self) -> TireaResult<()>
Delete this field entirely from the object.
Sourcepub fn delete_message(&self) -> TireaResult<()>
pub fn delete_message(&self) -> TireaResult<()>
Delete this field entirely from the object.
Sourcepub fn increment_progress(&self, amount: f64) -> TireaResult<()>
pub fn increment_progress(&self, amount: f64) -> TireaResult<()>
Increment the numeric field by the given amount.
Sourcepub fn decrement_progress(&self, amount: f64) -> TireaResult<()>
pub fn decrement_progress(&self, amount: f64) -> TireaResult<()>
Decrement the numeric field by the given amount.
Auto Trait Implementations§
impl<'a> Freeze for ToolProgressStateRef<'a>
impl<'a> !RefUnwindSafe for ToolProgressStateRef<'a>
impl<'a> Send for ToolProgressStateRef<'a>
impl<'a> Sync for ToolProgressStateRef<'a>
impl<'a> Unpin for ToolProgressStateRef<'a>
impl<'a> UnsafeUnpin for ToolProgressStateRef<'a>
impl<'a> !UnwindSafe for ToolProgressStateRef<'a>
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