pub struct InstantDt {
pub id: Option<String>,
pub extension: Option<Vec<Extension>>,
pub value: Option<Instant>,
}
Expand description
日期与时间
精度更高,最小精度要到秒,必须有时区。一般这种时间都是由机器生成的。
只接受FHIR规范约定的四种格式:
- 2009-12-24T07:12:45Z
- 2009-12-24T07:12:45.234Z
- 2009-12-24T07:12:45+08:00
- 2009-12-24T07:12:45.234+08:00
输出时,只有两种:
- 2009-12-24T07:12:45+08:00
- 2009-12-24T07:12:45.234+08:00
导入之后,会根据当地的时区将Z转换为对应的时区
Fields§
§id: Option<String>
xml:id (or equivalent in JSON)
extension: Option<Vec<Extension>>
Additional content defined by implementations
value: Option<Instant>
Primitive value for instant
Trait Implementations§
source§impl<'de> Deserialize<'de> for InstantDt
impl<'de> Deserialize<'de> for InstantDt
fn deserialize<De>(deserializer: De) -> Result<Self>where
De: Deserializer<'de>,
source§impl Element for InstantDt
impl Element for InstantDt
fn has_id(&self) -> bool
fn id(&self) -> &Option<String>
fn set_id<T: Into<String>>(self, id: T) -> Self
fn has_extension(&self) -> bool
fn extension(&self) -> &Option<Vec<Extension>>
fn set_extension(self, ext: Vec<Extension>) -> Self
fn add_extension(self, ext: Extension) -> Self
Auto Trait Implementations§
impl RefUnwindSafe for InstantDt
impl Send for InstantDt
impl Sync for InstantDt
impl Unpin for InstantDt
impl UnwindSafe for InstantDt
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