Struct liquid_core::model::Date
source · pub struct Date { /* private fields */ }
Expand description
Liquid’s native date only type.
Implementations§
Methods from Deref<Target = Date>§
pub const MIN: Date = Self::__from_ordinal_date_unchecked(MIN_YEAR, 1)
pub const MAX: Date = Self::__from_ordinal_date_unchecked(MAX_YEAR, days_in_year(MAX_YEAR))
Trait Implementations§
source§impl<'de> Deserialize<'de> for Date
impl<'de> Deserialize<'de> for Date
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 Ord for Date
impl Ord for Date
source§impl PartialEq<Date> for Date
impl PartialEq<Date> for Date
source§impl<'s> PartialEq<Date> for ScalarCow<'s>
impl<'s> PartialEq<Date> for ScalarCow<'s>
source§impl PartialEq<Date> for Value
impl PartialEq<Date> for Value
source§impl<'v> PartialEq<Date> for ValueCow<'v>
impl<'v> PartialEq<Date> for ValueCow<'v>
source§impl<'v> PartialEq<Date> for ValueViewCmp<'v>
impl<'v> PartialEq<Date> for ValueViewCmp<'v>
source§impl PartialOrd<Date> for Date
impl PartialOrd<Date> for Date
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'s> PartialOrd<Date> for ScalarCow<'s>
impl<'s> PartialOrd<Date> for ScalarCow<'s>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ValueView for Date
impl ValueView for Date
source§fn render(&self) -> DisplayCow<'_>
fn render(&self) -> DisplayCow<'_>
A
Display
for a BoxedValue
rendered for the user.source§fn source(&self) -> DisplayCow<'_>
fn source(&self) -> DisplayCow<'_>
A
Display
for a Value
as source code.source§fn query_state(&self, state: State) -> bool
fn query_state(&self, state: State) -> bool
Query the value’s state
source§fn to_kstr(&self) -> KStringCow<'_>
fn to_kstr(&self) -> KStringCow<'_>
Interpret as a string.
source§fn as_object(&self) -> Option<&dyn ObjectView>
fn as_object(&self) -> Option<&dyn ObjectView>
Extracts the object value if it is a object.
impl Copy for Date
impl Eq for Date
impl StructuralEq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
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