Struct data_plane_api::validate::FloatRules
source · [−]pub struct FloatRules {
pub const: Option<f32>,
pub lt: Option<f32>,
pub lte: Option<f32>,
pub gt: Option<f32>,
pub gte: Option<f32>,
pub in: Vec<f32>,
pub not_in: Vec<f32>,
pub ignore_empty: Option<bool>,
}Expand description
FloatRules describes the constraints applied to float values
Fields
const: Option<f32>Const specifies that this field must be exactly the specified value
lt: Option<f32>Lt specifies that this field must be less than the specified value, exclusive
lte: Option<f32>Lte specifies that this field must be less than or equal to the specified value, inclusive
gt: Option<f32>Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte: Option<f32>Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in: Vec<f32>In specifies that this field must be equal to one of the specified values
not_in: Vec<f32>NotIn specifies that this field cannot be equal to one of the specified values
ignore_empty: Option<bool>IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
Implementations
sourceimpl FloatRules
impl FloatRules
sourcepub fn ignore_empty(&self) -> bool
pub fn ignore_empty(&self) -> bool
Returns the value of ignore_empty, or the default value if ignore_empty is unset.
Trait Implementations
sourceimpl Clone for FloatRules
impl Clone for FloatRules
sourcefn clone(&self) -> FloatRules
fn clone(&self) -> FloatRules
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for FloatRules
impl Debug for FloatRules
sourceimpl Default for FloatRules
impl Default for FloatRules
sourceimpl Message for FloatRules
impl Message for FloatRules
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
sourcefn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
sourcefn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
sourcefn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
sourcefn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
sourcefn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
sourcefn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
sourcefn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self. Read moresourcefn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self. Read moresourceimpl PartialEq<FloatRules> for FloatRules
impl PartialEq<FloatRules> for FloatRules
sourcefn eq(&self, other: &FloatRules) -> bool
fn eq(&self, other: &FloatRules) -> bool
impl StructuralPartialEq for FloatRules
Auto Trait Implementations
impl RefUnwindSafe for FloatRules
impl Send for FloatRules
impl Sync for FloatRules
impl Unpin for FloatRules
impl UnwindSafe for FloatRules
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request