pub struct CreditCardRule {
pub message: Option<String>,
}Expand description
Credit Card validation rule (Luhn algorithm).
Fields§
§message: Option<String>Custom error message
Implementations§
Trait Implementations§
Source§impl Clone for CreditCardRule
impl Clone for CreditCardRule
Source§fn clone(&self) -> CreditCardRule
fn clone(&self) -> CreditCardRule
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 CreditCardRule
impl Debug for CreditCardRule
Source§impl Default for CreditCardRule
impl Default for CreditCardRule
Source§fn default() -> CreditCardRule
fn default() -> CreditCardRule
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreditCardRule
impl<'de> Deserialize<'de> for CreditCardRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CreditCardRule> for SerializableRule
impl From<CreditCardRule> for SerializableRule
Source§fn from(rule: CreditCardRule) -> Self
fn from(rule: CreditCardRule) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CreditCardRule
impl PartialEq for CreditCardRule
Source§impl Serialize for CreditCardRule
impl Serialize for CreditCardRule
Source§impl ValidationRule<String> for CreditCardRule
impl ValidationRule<String> for CreditCardRule
Source§impl ValidationRule<str> for CreditCardRule
impl ValidationRule<str> for CreditCardRule
impl StructuralPartialEq for CreditCardRule
Auto Trait Implementations§
impl Freeze for CreditCardRule
impl RefUnwindSafe for CreditCardRule
impl Send for CreditCardRule
impl Sync for CreditCardRule
impl Unpin for CreditCardRule
impl UnwindSafe for CreditCardRule
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more