Struct edgedb_protocol::model::LocalDatetime
source · [−]pub struct LocalDatetime { /* private fields */ }
Implementations
sourceimpl LocalDatetime
impl LocalDatetime
pub const MIN: LocalDatetime = LocalDatetime { micros: LocalDate::MIN.days as i64 * MICROS_PER_DAY as i64 }
pub const MAX: LocalDatetime = LocalDatetime { micros: LocalDate::MAX.days as i64 * MICROS_PER_DAY as i64 + LocalTime::MAX.micros as i64 }
pub fn from_micros(micros: i64) -> LocalDatetime
pub fn to_micros(self) -> i64
pub fn new(date: LocalDate, time: LocalTime) -> LocalDatetime
pub fn date(self) -> LocalDate
pub fn time(self) -> LocalTime
Trait Implementations
sourceimpl Clone for LocalDatetime
impl Clone for LocalDatetime
sourcefn clone(&self) -> LocalDatetime
fn clone(&self) -> LocalDatetime
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LocalDatetime
impl Debug for LocalDatetime
sourceimpl Display for LocalDatetime
impl Display for LocalDatetime
sourceimpl Hash for LocalDatetime
impl Hash for LocalDatetime
sourceimpl Ord for LocalDatetime
impl Ord for LocalDatetime
sourceimpl PartialEq<LocalDatetime> for LocalDatetime
impl PartialEq<LocalDatetime> for LocalDatetime
sourcefn eq(&self, other: &LocalDatetime) -> bool
fn eq(&self, other: &LocalDatetime) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LocalDatetime) -> bool
fn ne(&self, other: &LocalDatetime) -> bool
This method tests for !=
.
sourceimpl PartialOrd<LocalDatetime> for LocalDatetime
impl PartialOrd<LocalDatetime> for LocalDatetime
sourcefn partial_cmp(&self, other: &LocalDatetime) -> Option<Ordering>
fn partial_cmp(&self, other: &LocalDatetime) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl ScalarArg for LocalDatetime
impl ScalarArg for LocalDatetime
impl Copy for LocalDatetime
impl Eq for LocalDatetime
impl StructuralEq for LocalDatetime
impl StructuralPartialEq for LocalDatetime
Auto Trait Implementations
impl RefUnwindSafe for LocalDatetime
impl Send for LocalDatetime
impl Sync for LocalDatetime
impl Unpin for LocalDatetime
impl UnwindSafe for LocalDatetime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> QueryArg for T where
T: ScalarArg,
impl<T> QueryArg for T where
T: ScalarArg,
fn encode_slot(&self, enc: &mut Encoder<'_>) -> Result<(), Error>
fn check_descriptor(
ctx: &DescriptorContext<'_>,
pos: TypePos
) -> Result<(), Error>
sourceimpl<T> Queryable for T where
T: DecodeScalar,
impl<T> Queryable for T where
T: DecodeScalar,
fn decode(_decoder: &Decoder, buf: &[u8]) -> Result<T, DecodeError>
fn check_descriptor(
ctx: &DescriptorContext<'_>,
type_pos: TypePos
) -> Result<(), DescriptorMismatch>
fn decode_optional(
decoder: &Decoder,
buf: Option<&[u8]>
) -> Result<Self, DecodeError>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more