pub struct ActionResult {
pub success: bool,
pub action_taken: String,
pub action_type: Option<ActionType>,
pub screenshot: Option<String>,
pub error: Option<String>,
pub usage: AutomationUsage,
pub duration_ms: u64,
pub selector: Option<String>,
pub url_before: Option<String>,
pub url_after: Option<String>,
}Expand description
Result of an action execution.
Fields§
§success: boolWhether the action succeeded.
action_taken: StringDescription of action taken.
action_type: Option<ActionType>Type of action performed.
screenshot: Option<String>Screenshot after action (base64).
error: Option<String>Error message if failed.
usage: AutomationUsageToken usage for this action.
duration_ms: u64Duration in milliseconds.
selector: Option<String>Element selector used.
url_before: Option<String>URL before action.
url_after: Option<String>URL after action.
Implementations§
Source§impl ActionResult
impl ActionResult
Sourcepub fn failure(action: impl Into<String>, error: impl Into<String>) -> Self
pub fn failure(action: impl Into<String>, error: impl Into<String>) -> Self
Create a failed action result.
Sourcepub fn with_type(self, action_type: ActionType) -> Self
pub fn with_type(self, action_type: ActionType) -> Self
Set the action type.
Sourcepub fn with_screenshot(self, screenshot: impl Into<String>) -> Self
pub fn with_screenshot(self, screenshot: impl Into<String>) -> Self
Set the screenshot.
Sourcepub fn with_selector(self, selector: impl Into<String>) -> Self
pub fn with_selector(self, selector: impl Into<String>) -> Self
Set the selector.
Sourcepub fn with_duration(self, ms: u64) -> Self
pub fn with_duration(self, ms: u64) -> Self
Set duration.
Sourcepub fn with_usage(self, usage: AutomationUsage) -> Self
pub fn with_usage(self, usage: AutomationUsage) -> Self
Set usage stats.
Trait Implementations§
Source§impl Clone for ActionResult
impl Clone for ActionResult
Source§fn clone(&self) -> ActionResult
fn clone(&self) -> ActionResult
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 ActionResult
impl Debug for ActionResult
Source§impl Default for ActionResult
impl Default for ActionResult
Source§fn default() -> ActionResult
fn default() -> ActionResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ActionResult
impl<'de> Deserialize<'de> for ActionResult
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
Auto Trait Implementations§
impl Freeze for ActionResult
impl RefUnwindSafe for ActionResult
impl Send for ActionResult
impl Sync for ActionResult
impl Unpin for ActionResult
impl UnwindSafe for ActionResult
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