Struct rxing::common::DecoderRXingResult
source · pub struct DecoderRXingResult { /* private fields */ }Expand description
Encapsulates the result of decoding a matrix of bits. This typically applies to 2D barcode formats. For now it contains the raw bytes obtained, as well as a String interpretation of those bytes, if applicable.
@author Sean Owen
Implementations§
source§impl DecoderRXingResult
impl DecoderRXingResult
pub fn new( rawBytes: Vec<u8>, text: String, byteSegments: Vec<Vec<u8>>, ecLevel: String ) -> Self
pub fn with_symbology( rawBytes: Vec<u8>, text: String, byteSegments: Vec<Vec<u8>>, ecLevel: String, symbologyModifier: u32 ) -> Self
pub fn with_sa( rawBytes: Vec<u8>, text: String, byteSegments: Vec<Vec<u8>>, ecLevel: String, saSequence: i32, saParity: i32 ) -> Self
pub fn with_all( rawBytes: Vec<u8>, text: String, byteSegments: Vec<Vec<u8>>, ecLevel: String, saSequence: i32, saParity: i32, symbologyModifier: u32, contentType: String, isMirrored: bool ) -> Self
sourcepub fn getRawBytes(&self) -> &Vec<u8> ⓘ
pub fn getRawBytes(&self) -> &Vec<u8> ⓘ
@return raw bytes representing the result, or {@code null} if not applicable
sourcepub fn getNumBits(&self) -> usize
pub fn getNumBits(&self) -> usize
@return how many bits of {@link #getRawBytes()} are valid; typically 8 times its length @since 3.3.0
sourcepub fn setNumBits(&mut self, numBits: usize)
pub fn setNumBits(&mut self, numBits: usize)
@param numBits overrides the number of bits that are valid in {@link #getRawBytes()} @since 3.3.0
sourcepub fn getByteSegments(&self) -> &Vec<Vec<u8>>
pub fn getByteSegments(&self) -> &Vec<Vec<u8>>
@return list of byte segments in the result, or {@code null} if not applicable
sourcepub fn getECLevel(&self) -> &str
pub fn getECLevel(&self) -> &str
@return name of error correction level used, or {@code null} if not applicable
sourcepub fn getErrorsCorrected(&self) -> usize
pub fn getErrorsCorrected(&self) -> usize
@return number of errors corrected, or {@code null} if not applicable
pub fn setErrorsCorrected(&mut self, errorsCorrected: usize)
sourcepub fn getErasures(&self) -> usize
pub fn getErasures(&self) -> usize
@return number of erasures corrected, or {@code null} if not applicable
pub fn setErasures(&mut self, erasures: usize)
pub fn setOther(&mut self, other: Option<Rc<dyn Any>>)
pub fn hasStructuredAppend(&self) -> bool
pub fn getStructuredAppendParity(&self) -> i32
pub fn getStructuredAppendSequenceNumber(&self) -> i32
pub fn getSymbologyModifier(&self) -> u32
pub fn getContentType(&self) -> &str
pub fn setContentType(&mut self, content_type: String)
pub fn getIsMirrored(&self) -> bool
pub fn setIsMirrored(&mut self, is_mirrored: bool)
Auto Trait Implementations§
impl !RefUnwindSafe for DecoderRXingResult
impl !Send for DecoderRXingResult
impl !Sync for DecoderRXingResult
impl Unpin for DecoderRXingResult
impl !UnwindSafe for DecoderRXingResult
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
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<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.