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 Name for TimestampRules
impl Name for TimestampRules
Source§const NAME: &'static str = "TimestampRules"
const NAME: &'static str = "TimestampRules"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "validate"
const PACKAGE: &'static str = "validate"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for TimestampRules
impl PartialEq for TimestampRules
impl Copy for TimestampRules
impl StructuralPartialEq for TimestampRules
Auto Trait Implementations§
impl Freeze for TimestampRules
impl RefUnwindSafe for TimestampRules
impl Send for TimestampRules
impl Sync for TimestampRules
impl Unpin for TimestampRules
impl UnwindSafe for TimestampRules
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request