pub struct PageDateProperty {
pub id: Option<String>,
pub date: Option<PageDatePropertyParameter>,
}
Expand description
https://developers.notion.com/reference/page-property-values#date
$.['*'].id
: An underlying identifier for the property.id
remains constant when the property name changes.$.['*'].type
: Always"date"
$.['*'].date
: If the value is blank, it will benull
.$.['*'].date.start
: A date, with an optional time.$.['*'].date.end
: A string representing the end of a date range. If the value is null, then the date value is not a range.$.['*'].date.time_zone
: Alwaysnull
. The time zone is already included in the formats of start and end times.
Note: The ['*']
part represents the column name you set when creating the database.
Example date page property value
{
"Date": {
"id": "w%5E%7DO",
"type": "date",
"date": {
"start": "2024-04-04T00:00:00.000+02:00",
"end": null,
"time_zone": null
}
}
}
When the value is not set:
{
"Date": {
"id": "w%5E%7DO",
"type": "date",
"date": null
}
}
Fields§
§id: Option<String>
An underlying identifier for the property.
id
remains constant when the property name changes.
date: Option<PageDatePropertyParameter>
If the value is blank, it will be null
.
Implementations§
Source§impl PageDateProperty
impl PageDateProperty
Sourcepub fn id<T>(self, id: T) -> Self
pub fn id<T>(self, id: T) -> Self
Set the value of the id
field.
An underlying identifier for the property.
id
remains constant when the property name changes.
Sourcepub fn date(self, date: PageDatePropertyParameter) -> Self
pub fn date(self, date: PageDatePropertyParameter) -> Self
Set the value of the date
field.
If the value is blank, it will be null
.
Source§impl PageDateProperty
impl PageDateProperty
pub fn start(&mut self, start: DateOrDateTime) -> &mut Self
pub fn end(&mut self, end: DateOrDateTime) -> &mut Self
Trait Implementations§
Source§impl Clone for PageDateProperty
impl Clone for PageDateProperty
Source§fn clone(&self) -> PageDateProperty
fn clone(&self) -> PageDateProperty
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PageDateProperty
impl Debug for PageDateProperty
Source§impl Default for PageDateProperty
impl Default for PageDateProperty
Source§fn default() -> PageDateProperty
fn default() -> PageDateProperty
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PageDateProperty
impl<'de> Deserialize<'de> for PageDateProperty
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PageDateProperty
impl Display for PageDateProperty
Source§impl From<DateOrDateTime> for PageDateProperty
impl From<DateOrDateTime> for PageDateProperty
Source§fn from(value: DateOrDateTime) -> Self
fn from(value: DateOrDateTime) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PageDateProperty
impl PartialEq for PageDateProperty
Source§impl Serialize for PageDateProperty
impl Serialize for PageDateProperty
impl Eq for PageDateProperty
impl StructuralPartialEq for PageDateProperty
Auto Trait Implementations§
impl Freeze for PageDateProperty
impl RefUnwindSafe for PageDateProperty
impl Send for PageDateProperty
impl Sync for PageDateProperty
impl Unpin for PageDateProperty
impl UnwindSafe for PageDateProperty
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