pub struct YearWeekFunction;Expand description
YEARWEEK function - returns year and week as YYYYWW integer (MySQL-compatible)
Mode argument (default 0): 0: Week starts Sunday, week 1 is the one containing January 1 1 / 3: ISO week — week starts Monday, week 1 has 4+ days in new year 2: Week starts Sunday, week 1 has 4+ days in new year
Modes 1/3 use chrono’s ISO week (which may return prior year for early-January dates, matching MySQL’s behaviour).
Trait Implementations§
Source§impl SqlFunction for YearWeekFunction
impl SqlFunction for YearWeekFunction
Auto Trait Implementations§
impl Freeze for YearWeekFunction
impl RefUnwindSafe for YearWeekFunction
impl Send for YearWeekFunction
impl Sync for YearWeekFunction
impl Unpin for YearWeekFunction
impl UnsafeUnpin for YearWeekFunction
impl UnwindSafe for YearWeekFunction
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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