#[non_exhaustive]pub struct AmbiguityRecord {
pub ambiguity_class: PiiClass,
pub losing_candidates: Vec<LosingCandidate>,
pub reason: AmbiguityReason,
}Expand description
Structured metadata describing an ambiguity outcome.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ambiguity_class: PiiClassThe family-level class assigned when disambiguation failed.
losing_candidates: Vec<LosingCandidate>Variants that could not be disambiguated.
Producers must keep this list stable by sorting recognizer_id ascending.
reason: AmbiguityReasonWhy disambiguation failed.
Implementations§
Source§impl AmbiguityRecord
impl AmbiguityRecord
Sourcepub fn new(
ambiguity_class: PiiClass,
losing_candidates: Vec<LosingCandidate>,
reason: AmbiguityReason,
) -> Self
pub fn new( ambiguity_class: PiiClass, losing_candidates: Vec<LosingCandidate>, reason: AmbiguityReason, ) -> Self
Builds a structured ambiguity record.
Trait Implementations§
Source§impl Clone for AmbiguityRecord
impl Clone for AmbiguityRecord
Source§fn clone(&self) -> AmbiguityRecord
fn clone(&self) -> AmbiguityRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AmbiguityRecord
impl Debug for AmbiguityRecord
Source§impl<'de> Deserialize<'de> for AmbiguityRecord
impl<'de> Deserialize<'de> for AmbiguityRecord
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 AmbiguityRecord
impl PartialEq for AmbiguityRecord
Source§fn eq(&self, other: &AmbiguityRecord) -> bool
fn eq(&self, other: &AmbiguityRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AmbiguityRecord
impl Serialize for AmbiguityRecord
impl Eq for AmbiguityRecord
impl StructuralPartialEq for AmbiguityRecord
Auto Trait Implementations§
impl Freeze for AmbiguityRecord
impl RefUnwindSafe for AmbiguityRecord
impl Send for AmbiguityRecord
impl Sync for AmbiguityRecord
impl Unpin for AmbiguityRecord
impl UnsafeUnpin for AmbiguityRecord
impl UnwindSafe for AmbiguityRecord
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,
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>
Converts
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>
Converts
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