#[non_exhaustive]pub struct Date {
pub year: i32,
pub month: i32,
pub day: i32,
/* private fields */
}Expand description
Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:
- A full date, with non-zero year, month, and day values.
- A month and day, with a zero year (for example, an anniversary).
- A year on its own, with a zero month and a zero day.
- A year and month, with a zero day (for example, a credit card expiration date).
Related types:
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.year: i32Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
month: i32Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
day: i32Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn’t significant.
Implementations§
Trait Implementations§
Source§impl FromValue for Date
impl FromValue for Date
Source§fn from_value(value: &Value, spanner_type: &Type) -> Result<Self, ConvertError>
fn from_value(value: &Value, spanner_type: &Type) -> Result<Self, ConvertError>
Converts a Spanner value into the target Rust type, using the provided
Spanner
Type metadata for compatibility checks. Read moreSource§fn from_owned_value(
value: Value,
spanner_type: &Type,
) -> Result<Self, ConvertError>
fn from_owned_value( value: Value, spanner_type: &Type, ) -> Result<Self, ConvertError>
Converts an owned Spanner value into the target Rust type, using the provided
Spanner
Type metadata for compatibility checks. Read moreimpl StructuralPartialEq for Date
Auto Trait Implementations§
impl Forget for Date
impl Freeze for Date
impl Move for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request