Struct rxing::MultiFormatWriter
source · pub struct MultiFormatWriter;Expand description
This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat requested and encodes the barcode with the supplied contents.
@author dswitkin@google.com (Daniel Switkin)
Trait Implementations§
source§impl Default for MultiFormatWriter
impl Default for MultiFormatWriter
source§fn default() -> MultiFormatWriter
fn default() -> MultiFormatWriter
Returns the “default value” for a type. Read more
source§impl Writer for MultiFormatWriter
impl Writer for MultiFormatWriter
source§fn encode(
&self,
contents: &str,
format: &BarcodeFormat,
width: i32,
height: i32
) -> Result<BitMatrix>
fn encode( &self, contents: &str, format: &BarcodeFormat, width: i32, height: i32 ) -> Result<BitMatrix>
Encode a barcode using the default settings. Read more
source§fn encode_with_hints(
&self,
contents: &str,
format: &BarcodeFormat,
width: i32,
height: i32,
hints: &EncodingHintDictionary
) -> Result<BitMatrix>
fn encode_with_hints( &self, contents: &str, format: &BarcodeFormat, width: i32, height: i32, hints: &EncodingHintDictionary ) -> Result<BitMatrix>
@param contents The contents to encode in the barcode
@param format The barcode format to generate
@param width The preferred width in pixels
@param height The preferred height in pixels
@param hints Additional parameters to supply to the encoder
@return {@link BitMatrix} representing encoded barcode image
@throws WriterException if contents cannot be encoded legally in a format
Auto Trait Implementations§
impl Freeze for MultiFormatWriter
impl RefUnwindSafe for MultiFormatWriter
impl Send for MultiFormatWriter
impl Sync for MultiFormatWriter
impl Unpin for MultiFormatWriter
impl UnwindSafe for MultiFormatWriter
Blanket Implementations§
source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
source§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.
source§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,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
source§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.
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
Mutably borrows from an owned value. Read more
source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
source§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>,
Approximate the subject to a given type with the default scheme.
source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
source§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>
Read this value from the supplied reader. Same as
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§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).source§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.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.