pub enum DurationValidator {
GreaterThanDuration(String),
GreaterThanOrEqualToDuration(String),
LessThanDuration(String),
LessThanOrEqualToDuration(String),
BetweenDuration(String, String),
}Expand description
Describes Duration validation filters
Variants§
GreaterThanDuration(String)
Duration greater than a value
GreaterThanOrEqualToDuration(String)
Duration greater than or equal to a value
LessThanDuration(String)
Duration less than a value
LessThanOrEqualToDuration(String)
Duration less than or equal to a value
BetweenDuration(String, String)
Duration between two values (inclusive)
Implementations§
Source§impl DurationValidator
impl DurationValidator
pub fn unwrap_expr(expr: &Expr) -> &Expr
pub fn determine_enum_type(expr: &Expr) -> Result<String, Error>
pub fn parse_string_literal(expr: &Expr) -> Result<String, Error>
pub fn parse_bool_literal(expr: &Expr) -> Result<bool, Error>
pub fn parse_char_literal(expr: &Expr) -> Result<char, Error>
pub fn parse_i8_literal(expr: &Expr) -> Result<i8, Error>
pub fn parse_i16_literal(expr: &Expr) -> Result<i16, Error>
pub fn parse_i32_literal(expr: &Expr) -> Result<i32, Error>
pub fn parse_i64_literal(expr: &Expr) -> Result<i64, Error>
pub fn parse_isize_literal(expr: &Expr) -> Result<isize, Error>
pub fn parse_u8_literal(expr: &Expr) -> Result<u8, Error>
pub fn parse_u16_literal(expr: &Expr) -> Result<u16, Error>
pub fn parse_u32_literal(expr: &Expr) -> Result<u32, Error>
pub fn parse_u64_literal(expr: &Expr) -> Result<u64, Error>
pub fn parse_usize_literal(expr: &Expr) -> Result<usize, Error>
pub fn parse_f32_literal(expr: &Expr) -> Result<f32, Error>
pub fn parse_f64_literal(expr: &Expr) -> Result<f64, Error>
pub fn parse_from_expr(expr: &Expr) -> Result<Self, Error>
Trait Implementations§
Source§impl Clone for DurationValidator
impl Clone for DurationValidator
Source§impl Debug for DurationValidator
impl Debug for DurationValidator
Source§impl<'de> Deserialize<'de> for DurationValidator
impl<'de> Deserialize<'de> for DurationValidator
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
impl Eq for DurationValidator
Source§impl From<DurationValidator> for Validator
impl From<DurationValidator> for Validator
Source§fn from(value: DurationValidator) -> Self
fn from(value: DurationValidator) -> Self
Converts to this type from the input type.
Source§impl Hash for DurationValidator
impl Hash for DurationValidator
Source§impl MetaNames for DurationValidator
impl MetaNames for DurationValidator
const META_NAMES: MetaNameSet
Source§impl PartialEq for DurationValidator
impl PartialEq for DurationValidator
Source§impl Serialize for DurationValidator
impl Serialize for DurationValidator
impl StructuralPartialEq for DurationValidator
Source§impl ToTokens for DurationValidator
impl ToTokens for DurationValidator
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl Forget for DurationValidator
impl Freeze for DurationValidator
impl RefUnwindSafe for DurationValidator
impl Send for DurationValidator
impl Sync for DurationValidator
impl Unpin for DurationValidator
impl UnsafeUnpin for DurationValidator
impl UnwindSafe for DurationValidator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.