Struct rxing::MultiUseMultiFormatReader
source · pub struct MultiUseMultiFormatReader { /* 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 MultiUseMultiFormatReader
impl MultiUseMultiFormatReader
sourcepub fn decode_with_state<B: Binarizer>(
&mut self,
image: &mut BinaryBitmap<B>
) -> Result<RXingResult>
pub fn decode_with_state<B: Binarizer>( &mut self, image: &mut BinaryBitmap<B> ) -> Result<RXingResult>
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_hints(&mut self, hints: &DecodingHintDictionary)
pub fn set_hints(&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<B: Binarizer>( &mut self, image: &mut BinaryBitmap<B> ) -> Result<RXingResult>
Trait Implementations§
source§impl Default for MultiUseMultiFormatReader
impl Default for MultiUseMultiFormatReader
source§fn default() -> MultiUseMultiFormatReader
fn default() -> MultiUseMultiFormatReader
source§impl Reader for MultiUseMultiFormatReader
impl Reader for MultiUseMultiFormatReader
source§fn decode<B: Binarizer>(
&mut self,
image: &mut BinaryBitmap<B>
) -> Result<RXingResult>
fn decode<B: Binarizer>( &mut self, image: &mut BinaryBitmap<B> ) -> Result<RXingResult>
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<B: Binarizer>(
&mut self,
image: &mut BinaryBitmap<B>,
hints: &DecodingHintDictionary
) -> Result<RXingResult>
fn decode_with_hints<B: Binarizer>( &mut self, image: &mut BinaryBitmap<B>, hints: &DecodingHintDictionary ) -> Result<RXingResult>
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 MultiUseMultiFormatReader
impl !Send for MultiUseMultiFormatReader
impl !Sync for MultiUseMultiFormatReader
impl Unpin for MultiUseMultiFormatReader
impl !UnwindSafe for MultiUseMultiFormatReader
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
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
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.