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
Auto Trait Implementations§
impl Freeze for ClickResult
impl RefUnwindSafe for ClickResult
impl Send for ClickResult
impl Sync for ClickResult
impl Unpin for ClickResult
impl UnsafeUnpin for ClickResult
impl UnwindSafe for ClickResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more