pub enum ContextObservation {
Observed {
surface: IdentitySurface,
},
Skipped {
reason: String,
},
}Expand description
Result of probing a single context: either an observed
IdentitySurface or a Skipped marker describing why the
probe could not run.
Variants§
Observed
The context was probed and produced a (possibly partial) identity surface.
Fields
§
surface: IdentitySurfaceCaptured identity surface.
Skipped
The context could not be probed (worker unsupported, iframe creation blocked, etc.) — no panic, just a structured marker.
Implementations§
Source§impl ContextObservation
impl ContextObservation
Sourcepub const fn observed(surface: IdentitySurface) -> Self
pub const fn observed(surface: IdentitySurface) -> Self
Convenience constructor for an Observed surface.
Sourcepub fn skipped(reason: impl Into<String>) -> Self
pub fn skipped(reason: impl Into<String>) -> Self
Convenience constructor for a Skipped marker.
Sourcepub const fn is_observed(&self) -> bool
pub const fn is_observed(&self) -> bool
true when the observation is an Observed
variant (regardless of how many fields were populated).
Sourcepub const fn is_skipped(&self) -> bool
pub const fn is_skipped(&self) -> bool
true when the observation is a Skipped
marker.
Sourcepub const fn surface(&self) -> Option<&IdentitySurface>
pub const fn surface(&self) -> Option<&IdentitySurface>
Borrow the captured surface, when observed.
Trait Implementations§
Source§impl Clone for ContextObservation
impl Clone for ContextObservation
Source§fn clone(&self) -> ContextObservation
fn clone(&self) -> ContextObservation
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 ContextObservation
impl Debug for ContextObservation
Source§impl<'de> Deserialize<'de> for ContextObservation
impl<'de> Deserialize<'de> for ContextObservation
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
Source§impl PartialEq for ContextObservation
impl PartialEq for ContextObservation
Source§impl Serialize for ContextObservation
impl Serialize for ContextObservation
impl Eq for ContextObservation
impl StructuralPartialEq for ContextObservation
Auto Trait Implementations§
impl Freeze for ContextObservation
impl RefUnwindSafe for ContextObservation
impl Send for ContextObservation
impl Sync for ContextObservation
impl Unpin for ContextObservation
impl UnsafeUnpin for ContextObservation
impl UnwindSafe for ContextObservation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.