Struct bosonnlp::ConvertedTime

source ·
pub struct ConvertedTime {
    pub timestamp: Option<String>,
    pub timedelta: Option<String>,
    pub timespan: Option<(String, String)>,
    pub format: String,
}
Expand description

时间转换结果

Fields

timestamp: Option<String>

时间点,ISO8601 格式的时间字符串

timedelta: Option<String>

时间量,格式为 “xday,HH:MM:SS” 或 “HH:MM:SS” 的字符串

timespan: Option<(String, String)>

表示时间点组成的时间区间结果,格式为 (timestamp, timestamp)(timedelta, timedelta) 表示时间区间的起始和结束时间

format: String

时间数据格式, 有 timestamptimedeltatimespan_0、和 timespan_1

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.