Struct rxing::MultiFormatReader
source · pub struct MultiFormatReader { /* private fields */ }Expand description
MultiFormatReader is a convenience class and the main entry point into the library for most uses. By default it attempts to decode all barcode formats that the library supports. Optionally, you can provide a hints object to request different behavior, for example only decoding QR codes.
@author Sean Owen @author dswitkin@google.com (Daniel Switkin)
Implementations§
source§impl MultiFormatReader
impl MultiFormatReader
sourcepub fn decode_with_state(
&mut self,
image: &mut BinaryBitmap
) -> Result<RXingResult, Exceptions>
pub fn decode_with_state(
&mut self,
image: &mut BinaryBitmap
) -> Result<RXingResult, Exceptions>
Decode an image using the state set up by calling setHints() previously. Continuous scan clients will get a large speed increase by using this instead of decode().
@param image The pixel data to decode @return The contents of the image @throws NotFoundException Any errors which occurred
sourcepub fn set_ints(&mut self, hints: &DecodingHintDictionary)
pub fn set_ints(&mut self, hints: &DecodingHintDictionary)
This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls to decodeWithState(image) can reuse the same set of readers without reallocating memory. This is important for performance in continuous scan clients.
@param hints The set of hints to use for subsequent calls to decode(image)
pub fn decode_internal(
&mut self,
image: &mut BinaryBitmap
) -> Result<RXingResult, Exceptions>
Trait Implementations§
source§impl Default for MultiFormatReader
impl Default for MultiFormatReader
source§fn default() -> MultiFormatReader
fn default() -> MultiFormatReader
source§impl Reader for MultiFormatReader
impl Reader for MultiFormatReader
source§fn decode(&mut self, image: &mut BinaryBitmap) -> Result<RXingResult, Exceptions>
fn decode(&mut self, image: &mut BinaryBitmap) -> Result<RXingResult, Exceptions>
This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. Use setHints() followed by decodeWithState() for continuous scan applications.
@param image The pixel data to decode @return The contents of the image @throws NotFoundException Any errors which occurred
source§fn decode_with_hints(
&mut self,
image: &mut BinaryBitmap,
hints: &DecodingHintDictionary
) -> Result<RXingResult, Exceptions>
fn decode_with_hints(
&mut self,
image: &mut BinaryBitmap,
hints: &DecodingHintDictionary
) -> Result<RXingResult, Exceptions>
Decode an image using the hints provided. Does not honor existing state.
@param image The pixel data to decode @param hints The hints to use, clearing the previous state. @return The contents of the image @throws NotFoundException Any errors which occurred
Auto Trait Implementations§
impl !RefUnwindSafe for MultiFormatReader
impl !Send for MultiFormatReader
impl !Sync for MultiFormatReader
impl Unpin for MultiFormatReader
impl !UnwindSafe for MultiFormatReader
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>
§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>,
§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
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§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.