Struct rxing::common::ECIStringBuilder
source · pub struct ECIStringBuilder {
pub has_eci: bool,
pub symbology: SymbologyIdentifier,
/* private fields */
}
Expand description
Class that converts a sequence of ECIs and bytes into a string
@author Alex Geller
Fields§
§has_eci: bool
§symbology: SymbologyIdentifier
Implementations§
source§impl ECIStringBuilder
impl ECIStringBuilder
pub fn with_capacity(initial_capacity: usize) -> Self
pub fn bytes(&self) -> &[u8] ⓘ
sourcepub fn append_char(&mut self, value: char)
pub fn append_char(&mut self, value: char)
Appends {@code value} as a byte value
@param value character whose lowest byte is to be appended
sourcepub fn append_byte(&mut self, value: u8)
pub fn append_byte(&mut self, value: u8)
Appends {@code value} as a byte value
@param value byte to append
pub fn append_bytes(&mut self, value: &[u8])
sourcepub fn append_string(&mut self, value: &str)
pub fn append_string(&mut self, value: &str)
Appends the characters in {@code value} as bytes values
@param value string to append
sourcepub fn append(&mut self, value: i32)
pub fn append(&mut self, value: i32)
Append the string repesentation of {@code value} (short for {@code append(String.valueOf(value))})
@param value int to append as a string
sourcepub fn append_eci(&mut self, eci: Eci)
pub fn append_eci(&mut self, eci: Eci)
Appends ECI value to output.
@param value ECI value to append, as an int @throws FormatException on invalid ECI value
sourcepub fn switch_encoding(&mut self, charset: CharacterSet, is_eci: bool)
pub fn switch_encoding(&mut self, charset: CharacterSet, is_eci: bool)
Change the current encoding characterset, finding an eci to do so
sourcepub fn encodeCurrentBytesIfAny(&self) -> String
pub fn encodeCurrentBytesIfAny(&self) -> String
Finishes encoding anything in the buffer using the current ECI and resets.
This function can panic
sourcepub fn appendCharacters(&mut self, value: &str)
pub fn appendCharacters(&mut self, value: &str)
Appends the characters from {@code value} (unlike all other append methods of this class who append bytes)
@param value characters to append
sourcepub fn len(&mut self) -> usize
pub fn len(&mut self) -> usize
Short for {@code toString().length()} (if possible, use {@link #isEmpty()} instead)
@return length of string representation in characters
pub fn build_result(self) -> Self
Trait Implementations§
source§impl AddAssign<String> for ECIStringBuilder
impl AddAssign<String> for ECIStringBuilder
source§fn add_assign(&mut self, rhs: String)
fn add_assign(&mut self, rhs: String)
+=
operation. Read moresource§impl AddAssign<u8> for ECIStringBuilder
impl AddAssign<u8> for ECIStringBuilder
source§fn add_assign(&mut self, rhs: u8)
fn add_assign(&mut self, rhs: u8)
+=
operation. Read moresource§impl Clone for ECIStringBuilder
impl Clone for ECIStringBuilder
source§fn clone(&self) -> ECIStringBuilder
fn clone(&self) -> ECIStringBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ECIStringBuilder
impl Debug for ECIStringBuilder
source§impl Default for ECIStringBuilder
impl Default for ECIStringBuilder
source§fn default() -> ECIStringBuilder
fn default() -> ECIStringBuilder
source§impl Display for ECIStringBuilder
impl Display for ECIStringBuilder
source§impl PartialEq<ECIStringBuilder> for ECIStringBuilder
impl PartialEq<ECIStringBuilder> for ECIStringBuilder
source§fn eq(&self, other: &ECIStringBuilder) -> bool
fn eq(&self, other: &ECIStringBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for ECIStringBuilder
impl StructuralEq for ECIStringBuilder
impl StructuralPartialEq for ECIStringBuilder
Auto Trait Implementations§
impl RefUnwindSafe for ECIStringBuilder
impl Send for ECIStringBuilder
impl Sync for ECIStringBuilder
impl Unpin for ECIStringBuilder
impl UnwindSafe for ECIStringBuilder
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, 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.