pub struct ClickResult {
pub status: ClickStatus,
pub dispatched: bool,
pub effect: ClickEffect,
pub navigated: bool,
pub reason: String,
pub elapsed_ms: u128,
pub evidence: Vec<Evidence>,
pub action_id: String,
pub clicked: bool,
pub verified: bool,
}Expand description
Result of a click operation.
clicked and verified are retained for callers written against the old
API, but they are now derived from the honest fields rather than being set
optimistically: verified is true only when the effect was confirmed.
Fields§
§status: ClickStatusHow the operation ended.
dispatched: boolWhether the click was actually delivered to the page.
effect: ClickEffectWhat the page was observed to do.
Whether a navigation was observed around the click.
reason: StringThe reason for the result.
elapsed_ms: u128How long the operation took.
evidence: Vec<Evidence>Observations behind the verdict.
action_id: StringCorrelation ID for this click.
clicked: boolLegacy alias for ClickResult::dispatched.
verified: boolLegacy alias for “the effect was confirmed”.
Implementations§
Source§impl ClickResult
impl ClickResult
Sourcepub fn new(
status: ClickStatus,
dispatched: bool,
effect: ClickEffect,
reason: impl Into<String>,
) -> Self
pub fn new( status: ClickStatus, dispatched: bool, effect: ClickEffect, reason: impl Into<String>, ) -> Self
Build a result, deriving the legacy booleans from the honest fields.
Sourcepub fn with_evidence(self, evidence: Vec<Evidence>) -> Self
pub fn with_evidence(self, evidence: Vec<Evidence>) -> Self
Attach the observations behind this verdict.
Sourcepub fn with_elapsed_ms(self, elapsed_ms: u128) -> Self
pub fn with_elapsed_ms(self, elapsed_ms: u128) -> Self
Record how long the operation took.
Record that a navigation was observed.
Sourcepub fn with_action_id(self, action_id: impl Into<String>) -> Self
pub fn with_action_id(self, action_id: impl Into<String>) -> Self
Reuse an existing correlation ID.
Sourcepub fn unverified(reason: impl Into<String>) -> Self
pub fn unverified(reason: impl Into<String>) -> Self
A click that was delivered but whose effect nothing confirmed.
This replaces the old “assumed success” verdict.
A click cut short by navigation.
Navigation is not evidence that this click caused it: the navigation may well have been in flight before the click was dispatched.
Trait Implementations§
Source§impl Clone for ClickResult
impl Clone for ClickResult
Source§fn clone(&self) -> ClickResult
fn clone(&self) -> ClickResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more