pub struct InvalidDatePattern(pub String);Expand description
Error for when a date pattern is not supported by the library.
use chinese_format::gregorian::*;
assert_eq!(
InvalidDatePattern("dw".to_string()).to_string(),
"Invalid date pattern: dw"
);Tuple Fields§
§0: StringTrait Implementations§
Source§impl Clone for InvalidDatePattern
impl Clone for InvalidDatePattern
Source§fn clone(&self) -> InvalidDatePattern
fn clone(&self) -> InvalidDatePattern
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InvalidDatePattern
impl Debug for InvalidDatePattern
Source§impl Display for InvalidDatePattern
impl Display for InvalidDatePattern
Source§impl Error for InvalidDatePattern
impl Error for InvalidDatePattern
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl Hash for InvalidDatePattern
impl Hash for InvalidDatePattern
Source§impl Ord for InvalidDatePattern
impl Ord for InvalidDatePattern
Source§impl PartialEq for InvalidDatePattern
impl PartialEq for InvalidDatePattern
Source§impl PartialOrd for InvalidDatePattern
impl PartialOrd for InvalidDatePattern
impl Eq for InvalidDatePattern
impl StructuralPartialEq for InvalidDatePattern
Auto Trait Implementations§
impl Freeze for InvalidDatePattern
impl RefUnwindSafe for InvalidDatePattern
impl Send for InvalidDatePattern
impl Sync for InvalidDatePattern
impl Unpin for InvalidDatePattern
impl UnwindSafe for InvalidDatePattern
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)