pub struct AchCompanyId(/* private fields */);Expand description
A conservatively validated ACH company identifier.
Implementations§
Source§impl AchCompanyId
impl AchCompanyId
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, AchError>
pub fn new(value: impl AsRef<str>) -> Result<Self, AchError>
Creates an ACH company identifier from 1 to 10 conservative ASCII characters.
§Errors
Returns AchError::EmptyCompanyId when the trimmed input is empty,
AchError::CompanyIdTooLong when the input is longer than 10 bytes, and
AchError::InvalidCompanyIdCharacter when the input contains unsupported characters.
Trait Implementations§
Source§impl AsRef<str> for AchCompanyId
impl AsRef<str> for AchCompanyId
Source§impl Clone for AchCompanyId
impl Clone for AchCompanyId
Source§fn clone(&self) -> AchCompanyId
fn clone(&self) -> AchCompanyId
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 moreSource§impl Debug for AchCompanyId
impl Debug for AchCompanyId
Source§impl Display for AchCompanyId
impl Display for AchCompanyId
Source§impl FromStr for AchCompanyId
impl FromStr for AchCompanyId
Source§impl Hash for AchCompanyId
impl Hash for AchCompanyId
Source§impl Ord for AchCompanyId
impl Ord for AchCompanyId
Source§fn cmp(&self, other: &AchCompanyId) -> Ordering
fn cmp(&self, other: &AchCompanyId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AchCompanyId
impl PartialEq for AchCompanyId
Source§impl PartialOrd for AchCompanyId
impl PartialOrd for AchCompanyId
impl Eq for AchCompanyId
impl StructuralPartialEq for AchCompanyId
Auto Trait Implementations§
impl Freeze for AchCompanyId
impl RefUnwindSafe for AchCompanyId
impl Send for AchCompanyId
impl Sync for AchCompanyId
impl Unpin for AchCompanyId
impl UnsafeUnpin for AchCompanyId
impl UnwindSafe for AchCompanyId
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