#[non_exhaustive]pub struct DecodedContent {
pub text: String,
pub raw: Vec<u8>,
pub charset: Charset,
pub eci: Option<Vec<EciSegment>>,
pub fnc1: Option<Fnc1Position>,
}Expand description
The exact bytes, the declarations observed and the scanner’s ONE reading
of them (spec/01 § Content). Compare contents by identity (spec/01
§ Comparing contents), never by 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.text: Stringraw decoded as charset states; empty if and only if raw is
empty.
raw: Vec<u8>Payload bytes, base64 on the wire. QR family: the ORIGINAL bytes on every decode path (designators excluded), never an engine’s text. Other symbologies: the ISO/IEC 8859-1 encoding of the engine’s text when every character is ≤ U+00FF (exact on its non-ECI paths), else its UTF-8; under an ECI the engine’s text can omit a segment it could not decode (spec/01 § raw).
charset: CharsetHow text relates to raw.
eci: Option<Vec<EciSegment>>None (key absent): no designator observed. Some(vec![]): ECI use
signalled (]Q2/]Q4/]Q6) but the designators could not be
located.
fnc1: Option<Fnc1Position>None (key absent): no FNC1 observed, or not observable for this
symbology.
Trait Implementations§
Source§impl Clone for DecodedContent
impl Clone for DecodedContent
Source§impl Debug for DecodedContent
impl Debug for DecodedContent
Source§impl<'de> Deserialize<'de> for DecodedContent
impl<'de> Deserialize<'de> for DecodedContent
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 Eq for DecodedContent
Source§impl PartialEq for DecodedContent
impl PartialEq for DecodedContent
Source§impl Serialize for DecodedContent
impl Serialize for DecodedContent
impl StructuralPartialEq for DecodedContent
Auto Trait Implementations§
impl Forget for DecodedContent
impl Freeze for DecodedContent
impl Move for DecodedContent
impl RefUnwindSafe for DecodedContent
impl Send for DecodedContentwhere
RawVecInner: Send,
impl Sync for DecodedContentwhere
RawVecInner: Sync,
impl Unpin for DecodedContent
impl UnsafeUnpin for DecodedContentwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<EciSegment>: UnsafeUnpin,
impl UnwindSafe for DecodedContentwhere
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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