pub struct DateTimeSpec {
pub encoding: i32,
pub width: i32,
}Expand description
§8.5 Date/time value encoding spec.
Fields§
§encoding: i32§width: i32U32 / U64 for epoch encodings
Implementations§
Source§impl DateTimeSpec
impl DateTimeSpec
Sourcepub fn encoding(&self) -> DateTimeEncoding
pub fn encoding(&self) -> DateTimeEncoding
Returns the enum value of encoding, or the default if the field is set to an invalid enum value.
Sourcepub fn set_encoding(&mut self, value: DateTimeEncoding)
pub fn set_encoding(&mut self, value: DateTimeEncoding)
Sets encoding to the provided enum value.
Sourcepub fn width(&self) -> StorageType
pub fn width(&self) -> StorageType
Returns the enum value of width, or the default if the field is set to an invalid enum value.
Sourcepub fn set_width(&mut self, value: StorageType)
pub fn set_width(&mut self, value: StorageType)
Sets width to the provided enum value.
Trait Implementations§
Source§impl Clone for DateTimeSpec
impl Clone for DateTimeSpec
Source§fn clone(&self) -> DateTimeSpec
fn clone(&self) -> DateTimeSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DateTimeSpec
impl Debug for DateTimeSpec
Source§impl Default for DateTimeSpec
impl Default for DateTimeSpec
§impl<'de> Deserialize<'de> for DateTimeSpec
impl<'de> Deserialize<'de> for DateTimeSpec
§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 Message for DateTimeSpec
impl Message for DateTimeSpec
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 DateTimeSpec
impl PartialEq for DateTimeSpec
Source§fn eq(&self, other: &DateTimeSpec) -> bool
fn eq(&self, other: &DateTimeSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.§impl Serialize for DateTimeSpec
impl Serialize for DateTimeSpec
impl Copy for DateTimeSpec
impl StructuralPartialEq for DateTimeSpec
Auto Trait Implementations§
impl Freeze for DateTimeSpec
impl RefUnwindSafe for DateTimeSpec
impl Send for DateTimeSpec
impl Sync for DateTimeSpec
impl Unpin for DateTimeSpec
impl UnsafeUnpin for DateTimeSpec
impl UnwindSafe for DateTimeSpec
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