[−][src]Struct liquid_value::scalar::DateTime
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]
fn year(&self) -> i32
[src]
fn month(&self) -> u32
[src]
fn month0(&self) -> u32
[src]
fn day(&self) -> u32
[src]
fn day0(&self) -> u32
[src]
fn ordinal(&self) -> u32
[src]
fn ordinal0(&self) -> u32
[src]
fn weekday(&self) -> Weekday
[src]
fn iso_week(&self) -> IsoWeek
[src]
fn with_year(&self, year: i32) -> Option<Self>
[src]
fn with_month(&self, month: u32) -> Option<Self>
[src]
fn with_month0(&self, month0: u32) -> Option<Self>
[src]
fn with_day(&self, day: u32) -> Option<Self>
[src]
fn with_day0(&self, day0: u32) -> Option<Self>
[src]
fn with_ordinal(&self, ordinal: u32) -> Option<Self>
[src]
fn with_ordinal0(&self, ordinal0: u32) -> Option<Self>
[src]
fn year_ce(&self) -> (bool, u32)
[src]
fn num_days_from_ce(&self) -> i32
[src]
impl Debug for DateTime
[src]
impl Default for DateTime
[src]
impl<'de> Deserialize<'de> for DateTime
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for DateTime
[src]
impl Eq for DateTime
[src]
impl<'s> From<DateTime> for ScalarCow<'s>
[src]
impl Hash for DateTime
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for DateTime
[src]
fn cmp(&self, other: &DateTime) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'v> PartialEq<DateTime> for ValueCow<'v>
[src]
impl PartialEq<DateTime> for Value
[src]
impl<'v> PartialEq<DateTime> for ValueViewCmp<'v>
[src]
impl PartialEq<DateTime> for DateTime
[src]
impl<'s> PartialEq<DateTime> for ScalarCow<'s>
[src]
impl PartialOrd<DateTime> for DateTime
[src]
fn partial_cmp(&self, other: &DateTime) -> Option<Ordering>
[src]
fn lt(&self, other: &DateTime) -> bool
[src]
fn le(&self, other: &DateTime) -> bool
[src]
fn gt(&self, other: &DateTime) -> bool
[src]
fn ge(&self, other: &DateTime) -> bool
[src]
impl<'s> PartialOrd<DateTime> for ScalarCow<'s>
[src]
fn partial_cmp(&self, other: &DateTime) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for DateTime
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for DateTime
[src]
impl StructuralPartialEq for DateTime
[src]
impl Timelike for DateTime
[src]
fn hour(&self) -> u32
[src]
fn minute(&self) -> u32
[src]
fn second(&self) -> u32
[src]
fn nanosecond(&self) -> u32
[src]
fn with_hour(&self, hour: u32) -> Option<Self>
[src]
fn with_minute(&self, min: u32) -> Option<Self>
[src]
fn with_second(&self, sec: u32) -> Option<Self>
[src]
fn with_nanosecond(&self, nano: u32) -> Option<Self>
[src]
fn hour12(&self) -> (bool, u32)
[src]
fn num_seconds_from_midnight(&self) -> u32
[src]
impl ValueView for DateTime
[src]
fn as_debug(&self) -> &dyn Debug
[src]
fn render(&self) -> DisplayCow
[src]
fn source(&self) -> DisplayCow
[src]
fn type_name(&self) -> &'static str
[src]
fn query_state(&self, state: State) -> bool
[src]
fn to_kstr(&self) -> KStringCow
[src]
fn to_value(&self) -> Value
[src]
fn as_scalar(&self) -> Option<ScalarCow>
[src]
fn is_scalar(&self) -> bool
[src]
fn as_array(&self) -> Option<&dyn ArrayView>
[src]
fn is_array(&self) -> bool
[src]
fn as_object(&self) -> Option<&dyn ObjectView>
[src]
fn is_object(&self) -> bool
[src]
fn as_state(&self) -> Option<State>
[src]
fn is_state(&self) -> bool
[src]
fn is_nil(&self) -> bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,