pub struct Version { /* private fields */ }Expand description
See ISO 18004:2006 Annex D
@author Sean Owen
Implementations§
Source§impl Version
impl Version
pub fn Model1(version_number: u32) -> Result<VersionRef>
pub fn Model2(version_number: u32) -> Result<VersionRef>
pub fn Micro(version_number: u32) -> Result<VersionRef>
pub fn rMQR(version_number: u32) -> Result<VersionRef>
pub const fn DimensionOfVersion(version: u32, is_micro: bool) -> u32
pub const fn DimensionOffset(is_micro: bool) -> u32
pub const fn DimensionStep(is_micro: bool) -> u32
pub fn DecodeVersionInformation( versionBitsA: i32, versionBitsB: i32, ) -> Result<VersionRef>
pub const fn isMicro(&self) -> bool
pub const fn isModel1(&self) -> bool
pub const fn isModel2(&self) -> bool
pub const fn isRMQR(&self) -> bool
pub fn SymbolSize(version: u32, qr_type: Type) -> PointI
pub fn IsValidSize(size: PointI, qr_type: Type) -> bool
pub fn HasValidSizeType(bitMatrix: &BitMatrix, qr_type: Type) -> bool
pub fn HasValidSize(matrix: &BitMatrix) -> bool
pub fn NumberPoint(size: PointI) -> u32
pub fn Number(bitMatrix: &BitMatrix) -> u32
Source§impl Version
impl Version
pub const fn getVersionNumber(&self) -> u32
pub const fn getAlignmentPatternCenters(&self) -> &[u32]
pub const fn getTotalCodewords(&self) -> u32
pub fn getDimensionForVersion(&self) -> u32
pub const fn getECBlocksForLevel( &self, ecLevel: ErrorCorrectionLevel, ) -> &ECBlocks
Sourcepub fn getProvisionalVersionForDimension(dimension: u32) -> Result<VersionRef>
pub fn getProvisionalVersionForDimension(dimension: u32) -> Result<VersionRef>
Deduces version information purely from QR Code dimensions.
@param dimension dimension in modules @return Version for a QR Code of that dimension @throws FormatException if dimension is not 1 mod 4
pub fn getVersionForNumber(versionNumber: u32) -> Result<VersionRef>
pub fn decodeVersionInformation(versionBits: u32) -> Result<VersionRef>
Sourcepub fn buildFunctionPattern(&self) -> Result<BitMatrix>
pub fn buildFunctionPattern(&self) -> Result<BitMatrix>
See ISO 18004:2006 Annex E
Source§impl Version
impl Version
pub fn build_micro_versions() -> Box<[Version]>
Sourcepub fn buildVersions() -> Box<[Version]>
pub fn buildVersions() -> Box<[Version]>
See ISO 18004:2006 6.5.1 Table 9
pub fn build_model1_versions() -> Box<[Version]>
pub fn build_rmqr_versions() -> Box<[Version]>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnsafeUnpin for Version
impl UnwindSafe for Version
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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<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.