pub struct StringWithUpdateTime {
pub context: Option<String>,
pub update_time: Option<i64>,
pub update_time_str: Option<String>,
}Expand description
带更新时间的文本内容
Fields§
§context: Option<String>文本内容
update_time: Option<i64>更新时间戳(秒)
update_time_str: Option<String>更新时间字符串,格式 YYYY-MM-DD,对应市场时区
Implementations§
Source§impl StringWithUpdateTime
impl StringWithUpdateTime
Sourcepub fn context(&self) -> &str
pub fn context(&self) -> &str
Returns the value of context, or the default value if context is unset.
Sourcepub fn update_time(&self) -> i64
pub fn update_time(&self) -> i64
Returns the value of update_time, or the default value if update_time is unset.
Sourcepub fn update_time_str(&self) -> &str
pub fn update_time_str(&self) -> &str
Returns the value of update_time_str, or the default value if update_time_str is unset.
Trait Implementations§
Source§impl Clone for StringWithUpdateTime
impl Clone for StringWithUpdateTime
Source§fn clone(&self) -> StringWithUpdateTime
fn clone(&self) -> StringWithUpdateTime
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 StringWithUpdateTime
impl Debug for StringWithUpdateTime
Source§impl Default for StringWithUpdateTime
impl Default for StringWithUpdateTime
Source§impl<'de> Deserialize<'de> for StringWithUpdateTimewhere
StringWithUpdateTime: Default,
impl<'de> Deserialize<'de> for StringWithUpdateTimewhere
StringWithUpdateTime: Default,
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 Hash for StringWithUpdateTime
impl Hash for StringWithUpdateTime
Source§impl Message for StringWithUpdateTime
impl Message for StringWithUpdateTime
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for StringWithUpdateTime
impl PartialEq for StringWithUpdateTime
Source§impl Serialize for StringWithUpdateTime
impl Serialize for StringWithUpdateTime
impl Eq for StringWithUpdateTime
impl StructuralPartialEq for StringWithUpdateTime
Auto Trait Implementations§
impl Freeze for StringWithUpdateTime
impl RefUnwindSafe for StringWithUpdateTime
impl Send for StringWithUpdateTime
impl Sync for StringWithUpdateTime
impl Unpin for StringWithUpdateTime
impl UnsafeUnpin for StringWithUpdateTime
impl UnwindSafe for StringWithUpdateTime
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