Struct nuban_rust::Nuban
[−]
[src]
pub struct Nuban { /* fields omitted */ }
Contains details of account number, which includes bank code, and serial number
Methods
impl Nuban
[src]
fn new(bankcode: &str, serialnumber: &str) -> Nuban
[src]
Create new instance of Struct Nuban
Examples
use nuban_rust::*; let mut nuban_no = Nuban::new("011", "000001457");
fn full(&mut self) -> String
[src]
Produces the fully valid NUBAN (including check digit) from the previously given struct value
Examples
use nuban_rust::*; let mut nuban_no = Nuban::new("011", "000001457"); assert_eq!(nuban_no.full(), "0110000014579");
fn check_digit(&self) -> u32
[src]
Returns the correct check digit for the NUBAN details given
Examples
use nuban_rust::*; let nuban_no = Nuban::new("011", "000001457"); assert_eq!(nuban_no.check_digit(), 9);