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: &DecodeHints)
pub fn set_hints(&mut self, hints: &DecodeHints)
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: &DecodeHints,
) -> Result<RXingResult>
fn decode_with_hints<B: Binarizer>( &mut self, image: &mut BinaryBitmap<B>, hints: &DecodeHints, ) -> 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 Freeze for MultiUseMultiFormatReader
impl !RefUnwindSafe for MultiUseMultiFormatReader
impl Send for MultiUseMultiFormatReader
impl Sync for MultiUseMultiFormatReader
impl Unpin for MultiUseMultiFormatReader
impl !UnwindSafe for MultiUseMultiFormatReader
Blanket Implementations§
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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().Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.