pub enum CalDateOrDateTime {
DateTime(CalDateTime),
Date(CalDate),
}Variants§
DateTime(CalDateTime)
Date(CalDate)
Implementations§
Source§impl CalDateOrDateTime
impl CalDateOrDateTime
pub fn parse_prop( prop: &ContentLine, timezones: Option<&HashMap<String, Option<Tz>>>, default_type: &str, ) -> Result<Self, ParserError>
pub fn is_date(&self) -> bool
pub fn date_floor(&self) -> NaiveDate
pub fn date_ceil(&self) -> NaiveDate
pub fn timezone(&self) -> Tz
pub fn utc(&self) -> DateTime<Utc>
pub fn format(&self) -> String
pub fn value_type(&self) -> &'static str
Trait Implementations§
Source§impl Add<TimeDelta> for CalDateOrDateTime
impl Add<TimeDelta> for CalDateOrDateTime
Source§impl Clone for CalDateOrDateTime
impl Clone for CalDateOrDateTime
Source§fn clone(&self) -> CalDateOrDateTime
fn clone(&self) -> CalDateOrDateTime
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 CalDateOrDateTime
impl Debug for CalDateOrDateTime
Source§impl From<CalDate> for CalDateOrDateTime
impl From<CalDate> for CalDateOrDateTime
Source§impl From<CalDateOrDateTime> for CalDateTime
impl From<CalDateOrDateTime> for CalDateTime
Source§fn from(value: CalDateOrDateTime) -> Self
fn from(value: CalDateOrDateTime) -> Self
Converts to this type from the input type.
Source§impl From<CalDateOrDateTime> for DateTime<Tz>
impl From<CalDateOrDateTime> for DateTime<Tz>
Source§fn from(value: CalDateOrDateTime) -> Self
fn from(value: CalDateOrDateTime) -> Self
Converts to this type from the input type.
Source§impl From<CalDateTime> for CalDateOrDateTime
impl From<CalDateTime> for CalDateOrDateTime
Source§fn from(value: CalDateTime) -> Self
fn from(value: CalDateTime) -> Self
Converts to this type from the input type.
Source§impl Ord for CalDateOrDateTime
impl Ord for CalDateOrDateTime
Source§fn cmp(&self, other: &CalDateOrDateTime) -> Ordering
fn cmp(&self, other: &CalDateOrDateTime) -> 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 ParseProp for CalDateOrDateTime
impl ParseProp for CalDateOrDateTime
fn parse_prop( prop: &ContentLine, timezones: Option<&HashMap<String, Option<Tz>>>, default_type: &str, ) -> Result<Self, ParserError>
Source§impl PartialEq for CalDateOrDateTime
impl PartialEq for CalDateOrDateTime
Source§impl PartialOrd for CalDateOrDateTime
impl PartialOrd for CalDateOrDateTime
Source§impl Sub<&CalDateOrDateTime> for CalDateOrDateTime
impl Sub<&CalDateOrDateTime> for CalDateOrDateTime
Source§impl Value for CalDateOrDateTime
impl Value for CalDateOrDateTime
impl Eq for CalDateOrDateTime
impl StructuralPartialEq for CalDateOrDateTime
Auto Trait Implementations§
impl Freeze for CalDateOrDateTime
impl RefUnwindSafe for CalDateOrDateTime
impl Send for CalDateOrDateTime
impl Sync for CalDateOrDateTime
impl Unpin for CalDateOrDateTime
impl UnwindSafe for CalDateOrDateTime
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