pub enum OneOrAny<T = String> {
Any,
One(T),
AnyOf(Vec<T>),
}Expand description
A container used by a number of elements where the JSON serialization may be a wild-card value, a single string, or an array of string values.
Variants§
Any
The wildcard value, may be Any or All depending on use.
One(T)
One element of type T
AnyOf(Vec<T>)
A JSON array with elements of type T.
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for OneOrAny<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for OneOrAny<T>where
T: Deserialize<'de>,
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
Source§impl<T> FromIterator<T> for OneOrAny<T>
impl<T> FromIterator<T> for OneOrAny<T>
impl<T: Eq> Eq for OneOrAny<T>
Auto Trait Implementations§
impl<T> Freeze for OneOrAny<T>where
T: Freeze,
impl<T> RefUnwindSafe for OneOrAny<T>where
T: RefUnwindSafe,
impl<T> Send for OneOrAny<T>where
T: Send,
impl<T> Sync for OneOrAny<T>where
T: Sync,
impl<T> Unpin for OneOrAny<T>where
T: Unpin,
impl<T> UnwindSafe for OneOrAny<T>where
T: UnwindSafe,
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