#[non_exhaustive]pub struct Detection {
pub symbology: Symbology,
pub content: DecodedContent,
pub payload: Payload,
pub corners: Option<[Point; 4]>,
pub meta: QrMeta,
pub engines: Vec<EngineKind>,
pub occurrences: Vec<Occurrence>,
}Expand description
One decoded symbol content.
Detections are the distinct contents the scanner can tell apart
(spec/01 § Detection): every read of every attempt is reconciled before
publication, and reads with the same symbology, raw and FNC1 position
and compatible ECI evidence become one detection. Identical copies of a
symbol are one detection; a different raw, FNC1 position or
contradicting declarations always stay separate, even with equal text.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.symbology: SymbologyThe barcode symbology this detection was read as.
content: DecodedContentThe content: raw bytes, declarations and the one reading of them.
payload: PayloadTyped payload classification of the text.
corners: Option<[Point; 4]>Symbol corners in image coordinates, clockwise from top-left: from
rqrr (its decode, or a grid it detected that the scanner
error-corrected itself — engines may then list rxing alone) or the
S5 rescue candidate.
meta: QrMetaSymbol metadata, from the same source as corners; a symbol only
rxing read carries the EC level its decoder states and nothing else
(spec/01 § Detection).
engines: Vec<EngineKind>Engines that confirmed this payload (consensus surface for scoring).
occurrences: Vec<Occurrence>Where each physical copy of this content was measured (spec/01 § Occurrences): at least one, at most sixteen, earliest observed first. Identical copies stay one detection with several occurrences. Empty only in a report older than pipeline 5.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Detection
impl<'de> Deserialize<'de> for Detection
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>,
impl StructuralPartialEq for Detection
Auto Trait Implementations§
impl Forget for Detection
impl Freeze for Detectionwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<EciSegment>: Freeze,
PhantomData<Gs1Element>: Freeze,
PhantomData<String>: Freeze,
PhantomData<EngineKind>: Freeze,
PhantomData<Occurrence>: Freeze,
impl Move for Detection
impl RefUnwindSafe for Detection
impl Send for Detectionwhere
RawVecInner: Send,
impl Sync for Detectionwhere
RawVecInner: Sync,
impl Unpin for Detection
impl UnsafeUnpin for Detectionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<EciSegment>: UnsafeUnpin,
PhantomData<Gs1Element>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<EngineKind>: UnsafeUnpin,
PhantomData<Occurrence>: UnsafeUnpin,
impl UnwindSafe for Detectionwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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