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<RXingResultPoint>,
format: BarcodeFormat
) -> Self
pub fn new_timestamp(
text: &str,
rawBytes: Vec<u8>,
resultPoints: Vec<RXingResultPoint>,
format: BarcodeFormat,
timestamp: u128
) -> Self
pub fn new_complex(
text: &str,
rawBytes: Vec<u8>,
numBits: usize,
resultPoints: Vec<RXingResultPoint>,
format: BarcodeFormat,
timestamp: u128
) -> Self
pub fn new_from_existing_result(
prev: Self,
points: Vec<RXingResultPoint>
) -> 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 getRXingResultPoints(&self) -> &Vec<RXingResultPoint> ⓘ
pub fn getRXingResultPoints(&self) -> &Vec<RXingResultPoint> ⓘ
@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 getRXingResultPointsMut(&mut self) -> &mut Vec<RXingResultPoint> ⓘ
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 addRXingResultPoints(&mut self, newPoints: &mut Vec<RXingResultPoint>)
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
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>
Convert the given value into an approximately equivalent representation.
§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>
Convert the subject into an approximately equivalent representation.
§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, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
§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,
Approximate the subject to a given type with a specific scheme.
§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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.