[][src]Struct relativedelta::relativedelta::Builder

pub struct Builder { /* fields omitted */ }

Builder for RelativeDelta

Batch creation and further modification of relative and constant time parameters before normalization and fixing of parameters keeping them within meaningfull boundaries.

You should not need to construct the builder manually but use the convenience construction methods on RelativeDelta.

Implementations

impl Builder[src]

pub fn new(&self) -> RelativeDelta[src]

Construct new RelativeDelta

Returns a fixed RelativeDelta where time parameters are within meaningfull boundaries.

pub fn and_yysmmsdds(
    &mut self,
    year: Option<i32>,
    years: i32,
    month: Option<u32>,
    months: i64,
    day: Option<u32>,
    days: i64
) -> &mut Self
[src]

pub fn and_hhsmmssss(
    &mut self,
    hour: Option<u32>,
    hours: i64,
    minute: Option<u32>,
    minutes: i64,
    second: Option<u32>,
    seconds: i64
) -> &mut Self
[src]

pub fn with_years(&self, years: i32) -> Self[src]

Clone the builder and set years

pub fn with_months(&self, months: i64) -> Self[src]

Clone the builder and set months

pub fn with_days(&self, days: i64) -> Self[src]

Clone the builder and set days

pub fn with_hours(&self, hours: i64) -> Self[src]

Clone the builder and set hours

pub fn with_minutes(&self, minutes: i64) -> Self[src]

Clone the builder and set minutes

pub fn with_nanoseconds(&self, nanoseconds: i64) -> Self[src]

Clone the builder and set nanoseconds

pub fn and_years(&mut self, years: i32) -> &mut Self[src]

Set years on mutable ref and return itself for further chaining

pub fn and_months(&mut self, months: i64) -> &mut Self[src]

Set months on mutable ref and return itself for further chaining

pub fn and_months_f(&mut self, months_f: f64) -> &mut Self[src]

Set month floating part on mutable ref and return itself for further chaining

pub fn and_days(&mut self, days: i64) -> &mut Self[src]

Set days on mutable ref and return itself for further chaining

pub fn and_hours(&mut self, hours: i64) -> &mut Self[src]

Set hours on mutable ref and return itself for further chaining

pub fn and_minutes(&mut self, minutes: i64) -> &mut Self[src]

Set minutes on mutable ref and return itself for further chaining

pub fn and_seconds(&mut self, seconds: i64) -> &mut Self[src]

Set seconds on mutable ref and return itself for further chaining

pub fn and_nanoseconds(&mut self, nanoseconds: i64) -> &mut Self[src]

Set nanoseconds on mutable ref and return itself for further chaining

pub fn with_year(self, year: Option<i32>) -> Self[src]

Clone the builder and set an optional year If year is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes year and not overwrite it

pub fn with_month(self, month: Option<u32>) -> Self[src]

Clone the builder and set an optional month If month is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes month and not overwrite it

pub fn with_day(self, day: Option<u32>) -> Self[src]

Clone the builder and set an optional day If day is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes day and not overwrite it

pub fn with_hour(self, hour: Option<u32>) -> Self[src]

Clone the builder and set an optional hour If hour is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes hour and not overwrite it

pub fn and_year(&mut self, year: Option<i32>) -> &mut Self[src]

Set year on mutable ref and return itself for further chaining If year is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes year and not overwrite it

pub fn and_month(&mut self, month: Option<u32>) -> &mut Self[src]

Set month on mutable ref and return itself for further chaining If month is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes month and not overwrite it

pub fn and_day(&mut self, day: Option<u32>) -> &mut Self[src]

Set day on mutable ref and return itself for further chaining If day is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes day and not overwrite it

pub fn and_hour(&mut self, hour: Option<u32>) -> &mut Self[src]

Set hour on mutable ref and return itself for further chaining If hour is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes hour and not overwrite it

pub fn and_minute(&mut self, minute: Option<u32>) -> &mut Self[src]

Set minute on mutable ref and return itself for further chaining If minute is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes minute and not overwrite it

pub fn and_second(&mut self, second: Option<u32>) -> &mut Self[src]

Set second on mutable ref and return itself for further chaining If second is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes second and not overwrite it

pub fn and_nanosecond(&mut self, nanosecond: Option<u32>) -> &mut Self[src]

Set nanosecond on mutable ref and return itself for further chaining If nanosecond is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes nanosecond and not overwrite it

pub fn and_weekday(&mut self, weekday_nth: Option<(Weekday, i64)>) -> &mut Self[src]

Set weekday on mutable ref and return itself for further chaining If weekday is set to None, addition with e.g. chrono::DateTime will just keep the DateTimes weekday and not overwrite it

Trait Implementations

impl Default for Builder[src]

Auto Trait Implementations

impl RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.