pub struct TimestampRules {
pub required: Option<bool>,
pub const: Option<Timestamp>,
pub lt: Option<Timestamp>,
pub lte: Option<Timestamp>,
pub gt: Option<Timestamp>,
pub gte: Option<Timestamp>,
pub lt_now: Option<bool>,
pub gt_now: Option<bool>,
pub within: Option<Duration>,
}
Expand description
TimestampRules describe the constraints applied exclusively to the
google.protobuf.Timestamp
well-known type
Fields§
§required: Option<bool>
Required specifies that this field must be set
const: Option<Timestamp>
Const specifies that this field must be exactly the specified value
lt: Option<Timestamp>
Lt specifies that this field must be less than the specified value, exclusive
lte: Option<Timestamp>
Lte specifies that this field must be less than the specified value, inclusive
gt: Option<Timestamp>
Gt specifies that this field must be greater than the specified value, exclusive
gte: Option<Timestamp>
Gte specifies that this field must be greater than the specified value, inclusive
lt_now: Option<bool>
LtNow specifies that this must be less than the current time. LtNow can only be used with the Within rule.
gt_now: Option<bool>
GtNow specifies that this must be greater than the current time. GtNow can only be used with the Within rule.
within: Option<Duration>
Within specifies that this field must be within this duration of the current time. This constraint can be used alone or with the LtNow and GtNow rules.
Implementations§
Trait Implementations§
Source§impl Clone for TimestampRules
impl Clone for TimestampRules
Source§fn clone(&self) -> TimestampRules
fn clone(&self) -> TimestampRules
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TimestampRules
impl Debug for TimestampRules
Source§impl Default for TimestampRules
impl Default for TimestampRules
Source§impl Message for TimestampRules
impl Message for TimestampRules
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
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,
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,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self
.Source§impl PartialEq for TimestampRules
impl PartialEq for TimestampRules
Source§impl ReflectMessage for TimestampRules
impl ReflectMessage for TimestampRules
Source§fn descriptor(&self) -> MessageDescriptor
fn descriptor(&self) -> MessageDescriptor
MessageDescriptor
describing the type of this message.Source§fn transcode_to_dynamic(&self) -> DynamicMessagewhere
Self: Sized,
fn transcode_to_dynamic(&self) -> DynamicMessagewhere
Self: Sized,
DynamicMessage
by going
through the byte representation.