Struct rxing::RXingResult
source · pub struct RXingResult { /* private fields */ }Expand description
Encapsulates the result of decoding a barcode within an image.
@author Sean Owen
Implementations§
source§impl RXingResult
impl RXingResult
pub fn new( text: &str, rawBytes: Vec<u8>, resultPoints: Vec<Point>, format: BarcodeFormat ) -> Self
pub fn new_timestamp( text: &str, rawBytes: Vec<u8>, resultPoints: Vec<Point>, format: BarcodeFormat, timestamp: u128 ) -> Self
pub fn new_complex( text: &str, rawBytes: Vec<u8>, numBits: usize, resultPoints: Vec<Point>, format: BarcodeFormat, timestamp: u128 ) -> Self
pub fn new_from_existing_result(prev: Self, points: Vec<Point>) -> Self
pub fn with_decoder_result<T>( res: DecoderResult<T>, resultPoints: &[Point], format: BarcodeFormat ) -> Self
sourcepub fn getRawBytes(&self) -> &Vec<u8> ⓘ
pub fn getRawBytes(&self) -> &Vec<u8> ⓘ
@return raw bytes encoded by the barcode, if applicable, otherwise {@code null}
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 getPoints(&self) -> &Vec<Point>
pub fn getPoints(&self) -> &Vec<Point>
@return points related to the barcode in the image. These are typically points identifying finder patterns or the corners of the barcode. The exact meaning is specific to the type of barcode that was decoded.
pub fn getPointsMut(&mut self) -> &mut Vec<Point>
sourcepub fn getRXingResultPoints(&self) -> &Vec<Point>
pub fn getRXingResultPoints(&self) -> &Vec<Point>
Currently necessary because the external OneDReader proc macro uses it.
sourcepub fn getRXingResultPointsMut(&mut self) -> &mut Vec<Point>
pub fn getRXingResultPointsMut(&mut self) -> &mut Vec<Point>
Currently necessary because the external OneDReader proc macro uses it.
sourcepub fn getBarcodeFormat(&self) -> &BarcodeFormat
pub fn getBarcodeFormat(&self) -> &BarcodeFormat
@return {@link BarcodeFormat} representing the format of the barcode that was decoded
sourcepub fn getRXingResultMetadata(
&self
) -> &HashMap<RXingResultMetadataType, RXingResultMetadataValue>
pub fn getRXingResultMetadata( &self ) -> &HashMap<RXingResultMetadataType, RXingResultMetadataValue>
@return {@link Map} mapping {@link RXingResultMetadataType} keys to values. May be {@code null}. This contains optional metadata about what was detected about the barcode, like orientation.
pub fn putMetadata( &mut self, md_type: RXingResultMetadataType, value: RXingResultMetadataValue )
pub fn putAllMetadata( &mut self, metadata: HashMap<RXingResultMetadataType, RXingResultMetadataValue> )
pub fn addPoints(&mut self, newPoints: &mut Vec<Point>)
pub fn getTimestamp(&self) -> u128
Trait Implementations§
source§impl Clone for RXingResult
impl Clone for RXingResult
source§fn clone(&self) -> RXingResult
fn clone(&self) -> RXingResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for RXingResult
impl !Send for RXingResult
impl !Sync for RXingResult
impl Unpin for RXingResult
impl UnwindSafe for RXingResult
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.