pub struct ActionRecord {
pub step: usize,
pub action: String,
pub success: bool,
pub duration_ms: u64,
pub url_before: Option<String>,
pub url_after: Option<String>,
pub error: Option<String>,
pub retries: usize,
}Expand description
Record of an action taken during automation.
Fields§
§step: usizeStep number (1-indexed).
action: StringDescription of action.
success: boolWhether it succeeded.
duration_ms: u64Duration in milliseconds.
url_before: Option<String>URL before action.
url_after: Option<String>URL after action.
error: Option<String>Error if failed.
retries: usizeNumber of retries needed.
Implementations§
Source§impl ActionRecord
impl ActionRecord
Sourcepub fn new(
step: usize,
action: impl Into<String>,
success: bool,
) -> ActionRecord
pub fn new( step: usize, action: impl Into<String>, success: bool, ) -> ActionRecord
Create a new action record.
Sourcepub fn from_result(step: usize, result: &ActionResult) -> ActionRecord
pub fn from_result(step: usize, result: &ActionResult) -> ActionRecord
Create from an ActionResult.
Sourcepub fn with_retries(self, retries: usize) -> ActionRecord
pub fn with_retries(self, retries: usize) -> ActionRecord
Set retries.
Trait Implementations§
Source§impl Clone for ActionRecord
impl Clone for ActionRecord
Source§fn clone(&self) -> ActionRecord
fn clone(&self) -> ActionRecord
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 ActionRecord
impl Debug for ActionRecord
Source§impl Default for ActionRecord
impl Default for ActionRecord
Source§fn default() -> ActionRecord
fn default() -> ActionRecord
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ActionRecord
impl<'de> Deserialize<'de> for ActionRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ActionRecord
impl Serialize for ActionRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ActionRecord
impl RefUnwindSafe for ActionRecord
impl Send for ActionRecord
impl Sync for ActionRecord
impl Unpin for ActionRecord
impl UnsafeUnpin for ActionRecord
impl UnwindSafe for ActionRecord
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