[][src]Struct liquid_value::DateTime

#[repr(transparent)]
pub struct DateTime { /* fields omitted */ }

Liquid's native date + time type.

Methods

impl DateTime[src]

pub fn now() -> Self[src]

Create a DateTime from the current moment.

pub fn from_str(other: &str) -> Option<Self>[src]

Convert a str to Self

pub fn with_date(self, other: Date) -> Self[src]

Replace fields with other.

pub fn with_timezone(&self, tz: &FixedOffset) -> Self[src]

Changes the associated time zone. This does not change the actual DateTime (but will change the string representation).

pub fn date(&self) -> Date[src]

Retrieves a date component.

pub fn format<'a>(&self, fmt: &'a str) -> impl Display + 'a[src]

Formats the combined date and time with the specified format string. See the chrono::format::strftime module on the supported escape sequences.

Trait Implementations

impl Clone for DateTime[src]

impl Copy for DateTime[src]

impl Datelike for DateTime[src]

impl Debug for DateTime[src]

impl Default for DateTime[src]

impl<'de> Deserialize<'de> for DateTime[src]

impl Display for DateTime[src]

impl Eq for DateTime[src]

impl<'s> From<DateTime> for ScalarCow<'s>[src]

impl Hash for DateTime[src]

impl Ord for DateTime[src]

impl<'v> PartialEq<DateTime> for ValueCow<'v>[src]

impl PartialEq<DateTime> for DateTime[src]

impl<'s> PartialEq<DateTime> for ScalarCow<'s>[src]

impl PartialEq<DateTime> for Value[src]

impl<'v> PartialEq<DateTime> for ValueViewCmp<'v>[src]

impl PartialOrd<DateTime> for DateTime[src]

impl<'s> PartialOrd<DateTime> for ScalarCow<'s>[src]

impl Serialize for DateTime[src]

impl StructuralEq for DateTime[src]

impl StructuralPartialEq for DateTime[src]

impl Timelike for DateTime[src]

impl ValueView for DateTime[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.