pub struct Cpr(/* private fields */);Expand description
A validated Danish personal identification number (CPR-nummer).
Accepts 10-digit strings or the DDMMYY-XXXX form with a dash at position 6.
Validates that the date portion (DDMMYY) represents a plausible calendar date.
Stored as 10 digits without separator.
Note: the historical modulo-11 check is not applied because it was abolished for persons born on or after 1 January 2007.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cpr
impl<'de> Deserialize<'de> for Cpr
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Cpr
impl StructuralPartialEq for Cpr
Auto Trait Implementations§
impl Freeze for Cpr
impl RefUnwindSafe for Cpr
impl Send for Cpr
impl Sync for Cpr
impl Unpin for Cpr
impl UnsafeUnpin for Cpr
impl UnwindSafe for Cpr
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.