pub struct EdtfString(pub String);Expand description
An EDTF string.
Tuple Fields§
§0: StringImplementations§
Source§impl EdtfString
impl EdtfString
Sourcepub fn parse(&self) -> RefDate
pub fn parse(&self) -> RefDate
Parse the string as an EDTF date etc, or return the string as a literal.
Sourcepub fn is_uncertain(&self) -> bool
pub fn is_uncertain(&self) -> bool
Check if the date is uncertain (has “?” qualifier).
Sourcepub fn is_approximate(&self) -> bool
pub fn is_approximate(&self) -> bool
Check if the date is approximate (has “~” qualifier).
Sourcepub fn is_open_range(&self) -> bool
pub fn is_open_range(&self) -> bool
Check if the range is open-ended (ends with “..”).
Trait Implementations§
Source§impl Clone for EdtfString
impl Clone for EdtfString
Source§fn clone(&self) -> EdtfString
fn clone(&self) -> EdtfString
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EdtfString
impl Debug for EdtfString
Source§impl Default for EdtfString
impl Default for EdtfString
Source§fn default() -> EdtfString
fn default() -> EdtfString
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EdtfString
impl<'de> Deserialize<'de> for EdtfString
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 Display for EdtfString
impl Display for EdtfString
Source§impl PartialEq for EdtfString
impl PartialEq for EdtfString
Source§fn eq(&self, other: &EdtfString) -> bool
fn eq(&self, other: &EdtfString) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EdtfString
impl Serialize for EdtfString
impl StructuralPartialEq for EdtfString
Auto Trait Implementations§
impl Freeze for EdtfString
impl RefUnwindSafe for EdtfString
impl Send for EdtfString
impl Sync for EdtfString
impl Unpin for EdtfString
impl UnsafeUnpin for EdtfString
impl UnwindSafe for EdtfString
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