pub enum IsoVariant {
    Mod_11_2,
    Mod_11_10,
    Mod_27_26,
    Mod_37_2,
    Mod_37_36,
    Mod_97_10,
    Mod_661_26,
    Mod_1271_36,
}

Variants§

§

Mod_11_2

The data digits must be ‘0’ - ‘9’ but the check digit may also be ‘X’ (representing the value 10). Usage: unknown. This is not the ISBN check.

§

Mod_11_10

The ISO 7064 standard defines a family of check digits in the form of “Mod N+1,N”.

It catches all single digit errors but does not catch transposition errors “01” → “10” (but not vice-versa) and “34” → “43” (but not vice-versa).

§

Mod_27_26

ISO 7064 Mod_27_26 – same as Mod_37_36 but restricted to ‘A’-‘Z’

§

Mod_37_2

§

Mod_37_36

This scheme works similar to Mod_11_10, but is defined to use alphanumeric characters ‘0’ -‘9’, ‘A’ - ‘Z’ for the data and check digit

§

Mod_97_10

While this scheme is described in the standard as taking only a numeric alphabet it is used in a number of other standards with alpha-numeric input.

  1. IF alpha-numeric:
    1. replace any alphabetic character with it’s numeric equivalent where ‘A’ is 10, ‘B’ is 11, etc. The input string ‘9A8C’ therefore becomes ‘910812’.
  2. Convert this string into an integer value. An arbitrary precision integer is likely needed for longer input strings.
  3. The check value is calculated as 98 - (n % 97).
  4. If the value is less than 10 add a ‘0’ pad character to the left to produce the two character value.
§

Mod_661_26

ISO 7064 Mod_661_26 – restricted to ‘A’-‘Z’ and produces 2 check digits

§

Mod_1271_36

ISO 7064 Mod_1271_36 – alphanumeric and produces 2 check digits

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Casts the value.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Casts the value.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Casts the value.
Casts the value.
Casts the value.
Casts the value.
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Casts the value.
Casts the value.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Casts the value.
Casts the value.