Struct RoutingNumber
pub struct RoutingNumber(/* private fields */);Expand description
A validated 9-digit ABA routing number.
Implementations§
§impl RoutingNumber
impl RoutingNumber
pub fn new(value: impl AsRef<str>) -> Result<RoutingNumber, RoutingNumberError>
pub fn new(value: impl AsRef<str>) -> Result<RoutingNumber, RoutingNumberError>
Creates a routing number after shape and checksum validation.
§Errors
Returns RoutingNumberError::InvalidLength when the trimmed input is not nine bytes,
RoutingNumberError::NotDigits when any byte is not a digit, and
RoutingNumberError::InvalidChecksum when the ABA checksum fails.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the routing number and returns its owned string.
Trait Implementations§
§impl AsRef<str> for RoutingNumber
impl AsRef<str> for RoutingNumber
§impl Clone for RoutingNumber
impl Clone for RoutingNumber
§fn clone(&self) -> RoutingNumber
fn clone(&self) -> RoutingNumber
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for RoutingNumber
impl Debug for RoutingNumber
§impl Display for RoutingNumber
impl Display for RoutingNumber
§impl FromStr for RoutingNumber
impl FromStr for RoutingNumber
§type Err = RoutingNumberError
type Err = RoutingNumberError
The associated error which can be returned from parsing.
§fn from_str(
value: &str,
) -> Result<RoutingNumber, <RoutingNumber as FromStr>::Err>
fn from_str( value: &str, ) -> Result<RoutingNumber, <RoutingNumber as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for RoutingNumber
impl Hash for RoutingNumber
§impl Ord for RoutingNumber
impl Ord for RoutingNumber
§impl PartialEq for RoutingNumber
impl PartialEq for RoutingNumber
§impl PartialOrd for RoutingNumber
impl PartialOrd for RoutingNumber
§impl TryFrom<&str> for RoutingNumber
impl TryFrom<&str> for RoutingNumber
§type Error = RoutingNumberError
type Error = RoutingNumberError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<RoutingNumber, <RoutingNumber as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<RoutingNumber, <RoutingNumber as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for RoutingNumber
impl StructuralPartialEq for RoutingNumber
Auto Trait Implementations§
impl Freeze for RoutingNumber
impl RefUnwindSafe for RoutingNumber
impl Send for RoutingNumber
impl Sync for RoutingNumber
impl Unpin for RoutingNumber
impl UnsafeUnpin for RoutingNumber
impl UnwindSafe for RoutingNumber
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