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 success(action: impl Into<String>) -> ActionResult
pub fn success(action: impl Into<String>) -> ActionResult
Create a successful action result.
Sourcepub fn failure(
action: impl Into<String>,
error: impl Into<String>,
) -> ActionResult
pub fn failure( action: impl Into<String>, error: impl Into<String>, ) -> ActionResult
Create a failed action result.
Sourcepub fn with_type(self, action_type: ActionType) -> ActionResult
pub fn with_type(self, action_type: ActionType) -> ActionResult
Set the action type.
Sourcepub fn with_screenshot(self, screenshot: impl Into<String>) -> ActionResult
pub fn with_screenshot(self, screenshot: impl Into<String>) -> ActionResult
Set the screenshot.
Sourcepub fn with_selector(self, selector: impl Into<String>) -> ActionResult
pub fn with_selector(self, selector: impl Into<String>) -> ActionResult
Set the selector.
Sourcepub fn with_duration(self, ms: u64) -> ActionResult
pub fn with_duration(self, ms: u64) -> ActionResult
Set duration.
Sourcepub fn with_usage(self, usage: AutomationUsage) -> ActionResult
pub fn with_usage(self, usage: AutomationUsage) -> ActionResult
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<ActionResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ActionResult
impl Serialize for ActionResult
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 ActionResult
impl RefUnwindSafe for ActionResult
impl Send for ActionResult
impl Sync for ActionResult
impl Unpin for ActionResult
impl UnsafeUnpin 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