pub struct Instant { /* private fields */ }Expand description
Stored and written in UTC whatever offset it was read with.
Implementations§
Source§impl Instant
impl Instant
Sourcepub fn parse(text: &str) -> Result<Self>
pub fn parse(text: &str) -> Result<Self>
RFC 3339 with an offset, or a datetime-local value without one, read in the display zone.
pub fn parse_in(text: &str, zone: &DisplayZone) -> Result<Self>
Sourcepub fn is_wall_clock(text: &str) -> bool
pub fn is_wall_clock(text: &str) -> bool
A datetime-local value: minutes, or seconds and a fraction when the control’s step allows.
pub fn timestamp(self) -> Timestamp
pub fn checked_add(self, duration: Duration) -> Result<Self>
pub fn checked_sub(self, duration: Duration) -> Result<Self>
Trait Implementations§
impl Copy for Instant
Source§impl<'de> Deserialize<'de> for Instant
impl<'de> Deserialize<'de> for Instant
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Instant
Source§impl Ord for Instant
impl Ord for Instant
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
impl Ordered for Instant
Source§impl PartialOrd for Instant
impl PartialOrd for Instant
impl StructuralPartialEq for Instant
Auto Trait Implementations§
impl Freeze for Instant
impl RefUnwindSafe for Instant
impl Send for Instant
impl Sync for Instant
impl Unpin for Instant
impl UnsafeUnpin for Instant
impl UnwindSafe for Instant
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<V> Cast for Vwhere
V: Value,
impl<V> Cast for Vwhere
V: Value,
const COLUMNS: &'static [ColumnSpec] = const COLUMNS: &'static [ColumnSpec] = <V::Inner>::COLUMNS;
const NULLABLE: bool = const NULLABLE: bool = <V::Inner>::NULLABLE;
Source§const SENSITIVE: bool = const SENSITIVE: bool = V::SENSITIVE || <V::Inner>::SENSITIVE;
const SENSITIVE: bool = const SENSITIVE: bool = V::SENSITIVE || <V::Inner>::SENSITIVE;
A field holding it is never filtered, sorted, listed or searched, as
#[sensitive] ones.fn encode(&self, out: &mut Vec<SqlValue>)
fn decode(row: &mut dyn ColumnReader) -> Result<V, Error>
Source§const MOVES: Option<Moves<Self>> = None
const MOVES: Option<Moves<Self>> = None
Set for a value moving between listed states; a save of any other value skips the check.
Source§const HOLDS_STATES: bool = _
const HOLDS_STATES: bool = _
Set when a state anywhere in the value is checked on save, as a field’s of several.