Enum foxbox_taxonomy::util::Exactly [] [src]

pub enum Exactly<T> {
    Always,
    Exactly(T),
    Never,
}

A marker for a request that a expects a specific value.

Variants

Always

No constraint.

Exactly

Expect a specific value.

Never

Never accept a constraint. This can happen, for instance, we have have attempted to and two conflicting Exactly

Methods

impl<T> Exactly<T> where T: PartialEq

fn and(self, other: Self) -> Self

Combine two constraints.

fn is_empty(&self) -> bool

fn matches(&self, value: &T) -> bool

Trait Implementations

impl<T: Serialize> Serialize for Exactly<T>

fn serialize<__S>(&self, serializer: &mut __S) -> Result<(), __S::Error> where __S: Serializer

impl<T: Deserialize> Deserialize for Exactly<T>

fn deserialize<__D>(deserializer: &mut __D) -> Result<Exactly<T>, __D::Error> where __D: Deserializer

impl<T> Parser<Exactly<T>> for Exactly<T> where T: Parser<T>

fn description() -> String

fn parse(path: Path, source: &mut JSON) -> Result<Self, ParseError>

fn from_str(source: &str) -> Result<T, ParseError>

fn take(path: Path, source: &mut JSON, field_name: &str) -> Result<T, ParseError>

fn take_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<T, ParseError>>

fn take_vec_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<Vec<T>, ParseError>>

fn take_vec(path: Path, source: &mut JSON, field_name: &str) -> Result<Vec<T>, ParseError>

impl<T> Default for Exactly<T>

fn default() -> Self

Derived Implementations

impl<T: Debug> Debug for Exactly<T>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<T: Clone> Clone for Exactly<T>

fn clone(&self) -> Exactly<T>

1.0.0fn clone_from(&mut self, source: &Self)