pub struct AutomationResult {
pub label: String,
pub steps_executed: usize,
pub success: bool,
pub error: Option<String>,
pub usage: AutomationUsage,
pub extracted: Option<Value>,
pub screenshot: Option<String>,
pub spawn_pages: Vec<String>,
pub relevant: Option<bool>,
pub reasoning: Option<String>,
}Expand description
Result of an automation operation.
Fields§
§label: StringLabel for this automation.
steps_executed: usizeNumber of steps executed.
success: boolWhether automation succeeded.
error: Option<String>Error message if failed.
usage: AutomationUsageToken usage.
extracted: Option<Value>Extracted data.
screenshot: Option<String>Screenshot (base64).
spawn_pages: Vec<String>URLs to open in new pages concurrently.
relevant: Option<bool>Whether the page is relevant to crawl goals. None = relevance gate not enabled; Some(false) = irrelevant.
reasoning: Option<String>Optional reasoning text if the model returned it.
Implementations§
Source§impl AutomationResult
impl AutomationResult
Sourcepub fn success(label: impl Into<String>, steps: usize) -> AutomationResult
pub fn success(label: impl Into<String>, steps: usize) -> AutomationResult
Create a successful result.
Sourcepub fn failure(
label: impl Into<String>,
error: impl Into<String>,
) -> AutomationResult
pub fn failure( label: impl Into<String>, error: impl Into<String>, ) -> AutomationResult
Create a failed result.
Sourcepub fn with_extracted(self, data: Value) -> AutomationResult
pub fn with_extracted(self, data: Value) -> AutomationResult
Add extracted data.
Sourcepub fn with_screenshot(self, screenshot: impl Into<String>) -> AutomationResult
pub fn with_screenshot(self, screenshot: impl Into<String>) -> AutomationResult
Add screenshot.
Sourcepub fn with_usage(self, usage: AutomationUsage) -> AutomationResult
pub fn with_usage(self, usage: AutomationUsage) -> AutomationResult
Add usage stats.
Sourcepub fn with_spawn_pages(self, pages: Vec<String>) -> AutomationResult
pub fn with_spawn_pages(self, pages: Vec<String>) -> AutomationResult
Add URLs to spawn in new pages.
Sourcepub fn add_spawn_page(self, url: impl Into<String>) -> AutomationResult
pub fn add_spawn_page(self, url: impl Into<String>) -> AutomationResult
Add a single URL to spawn in a new page.
Sourcepub fn has_spawn_pages(&self) -> bool
pub fn has_spawn_pages(&self) -> bool
Check if there are pages to spawn.
Sourcepub fn with_relevant(self, relevant: Option<bool>) -> AutomationResult
pub fn with_relevant(self, relevant: Option<bool>) -> AutomationResult
Set relevance flag.
Sourcepub fn with_reasoning(self, reasoning: Option<String>) -> AutomationResult
pub fn with_reasoning(self, reasoning: Option<String>) -> AutomationResult
Set optional reasoning text.
Trait Implementations§
Source§impl Clone for AutomationResult
impl Clone for AutomationResult
Source§fn clone(&self) -> AutomationResult
fn clone(&self) -> AutomationResult
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 AutomationResult
impl Debug for AutomationResult
Source§impl Default for AutomationResult
impl Default for AutomationResult
Source§fn default() -> AutomationResult
fn default() -> AutomationResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AutomationResult
impl<'de> Deserialize<'de> for AutomationResult
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AutomationResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AutomationResult, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AutomationResult
impl Serialize for AutomationResult
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 AutomationResult
impl RefUnwindSafe for AutomationResult
impl Send for AutomationResult
impl Sync for AutomationResult
impl Unpin for AutomationResult
impl UnsafeUnpin for AutomationResult
impl UnwindSafe for AutomationResult
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