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 failure(label: impl Into<String>, error: impl Into<String>) -> Self
pub fn failure(label: impl Into<String>, error: impl Into<String>) -> Self
Create a failed result.
Sourcepub fn with_extracted(self, data: Value) -> Self
pub fn with_extracted(self, data: Value) -> Self
Add extracted data.
Sourcepub fn with_screenshot(self, screenshot: impl Into<String>) -> Self
pub fn with_screenshot(self, screenshot: impl Into<String>) -> Self
Add screenshot.
Sourcepub fn with_usage(self, usage: AutomationUsage) -> Self
pub fn with_usage(self, usage: AutomationUsage) -> Self
Add usage stats.
Sourcepub fn with_spawn_pages(self, pages: Vec<String>) -> Self
pub fn with_spawn_pages(self, pages: Vec<String>) -> Self
Add URLs to spawn in new pages.
Sourcepub fn add_spawn_page(self, url: impl Into<String>) -> Self
pub fn add_spawn_page(self, url: impl Into<String>) -> Self
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>) -> Self
pub fn with_relevant(self, relevant: Option<bool>) -> Self
Set relevance flag.
Sourcepub fn with_reasoning(self, reasoning: Option<String>) -> Self
pub fn with_reasoning(self, reasoning: Option<String>) -> Self
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<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 AutomationResult
impl RefUnwindSafe for AutomationResult
impl Send for AutomationResult
impl Sync for AutomationResult
impl Unpin 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