Trait dateless::prelude::Period[][src]

pub trait Period: Debug + Send + Serialize + Deserialize {
    fn contains(&self, date: Date<Utc>) -> bool;
fn get_date_time_start(&self) -> DateTime<Utc>;
fn starts_before(&self, date: Date<Utc>) -> bool;
fn with_new_start(&self, date: Date<Utc>) -> Box<dyn Period>;
fn cloned(&self) -> Box<dyn Period>;
fn as_weekdays(&self) -> (u32, u32);
fn as_days_of_month(&self) -> (u32, u32);
fn as_months(&self) -> (u32, u32);
fn with_new_month(&self, month: u32) -> Date<Utc>; }

Required methods

fn contains(&self, date: Date<Utc>) -> bool[src]

fn get_date_time_start(&self) -> DateTime<Utc>[src]

fn starts_before(&self, date: Date<Utc>) -> bool[src]

fn with_new_start(&self, date: Date<Utc>) -> Box<dyn Period>[src]

fn cloned(&self) -> Box<dyn Period>[src]

fn as_weekdays(&self) -> (u32, u32)[src]

fn as_days_of_month(&self) -> (u32, u32)[src]

fn as_months(&self) -> (u32, u32)[src]

fn with_new_month(&self, month: u32) -> Date<Utc>[src]

Loading content...

Trait Implementations

impl<'typetag> Serialize for dyn Period + 'typetag[src]

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl<'typetag> Serialize for dyn Period + Send + 'typetag[src]

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl<'typetag> Serialize for dyn Period + Sync + 'typetag[src]

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl<'typetag> Serialize for dyn Period + Send + Sync + 'typetag[src]

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Strictest for dyn Period[src]

type Object = dyn Period + Send

Implementors

impl Period for StartEnd[src]

fn contains(&self, date: Date<Utc>) -> bool[src]

fn get_date_time_start(&self) -> DateTime<Utc>[src]

fn starts_before(&self, date: Date<Utc>) -> bool[src]

fn with_new_start(&self, date: Date<Utc>) -> Box<dyn Period>[src]

fn as_weekdays(&self) -> (u32, u32)[src]

fn as_days_of_month(&self) -> (u32, u32)[src]

fn as_months(&self) -> (u32, u32)[src]

fn with_new_month(&self, month: u32) -> Date<Utc>[src]

fn cloned(&self) -> Box<dyn Period>[src]

impl Period for WholeDays[src]

fn contains(&self, date: Date<Utc>) -> bool[src]

fn get_date_time_start(&self) -> DateTime<Utc>[src]

fn starts_before(&self, date: Date<Utc>) -> bool[src]

fn with_new_start(&self, date: Date<Utc>) -> Box<dyn Period>[src]

fn as_weekdays(&self) -> (u32, u32)[src]

fn as_days_of_month(&self) -> (u32, u32)[src]

fn as_months(&self) -> (u32, u32)[src]

fn with_new_month(&self, month: u32) -> Date<Utc>[src]

fn cloned(&self) -> Box<dyn Period>[src]

Loading content...