pub struct Variable<K, V> {
pub name: VariableName<K>,
pub value: V,
}
Fields§
§name: VariableName<K>
§value: V
Implementations§
Trait Implementations§
Source§impl<K, V> FromIterator<Variable<K, V>> for Variables<K, V>
impl<K, V> FromIterator<Variable<K, V>> for Variables<K, V>
Source§impl<K, V> TypedVariable for Variable<K, V>where
for<'a> VariableName<K>: ValueParser<Value<'a> = VariableName<K>> + AsRef<str> + Clone + 'a,
for<'a> K: Clone + 'a,
for<'a> V: ValueParser<Value<'a> = V> + Clone + 'a,
impl<K, V> TypedVariable for Variable<K, V>where
for<'a> VariableName<K>: ValueParser<Value<'a> = VariableName<K>> + AsRef<str> + Clone + 'a,
for<'a> K: Clone + 'a,
for<'a> V: ValueParser<Value<'a> = V> + Clone + 'a,
Source§impl<K, V> ValueParserFactory for Variable<K, V>where
V: ValueParser,
K: Send + Sync + Clone,
for<'a> <V as ValueParser>::Value<'a>: Send + Sync + Clone,
for<'a> Variable<K, V>: TypedVariable<Key<'a> = K, Value<'a> = V> + Send + Sync + Clone + 'static,
impl<K, V> ValueParserFactory for Variable<K, V>where
V: ValueParser,
K: Send + Sync + Clone,
for<'a> <V as ValueParser>::Value<'a>: Send + Sync + Clone,
for<'a> Variable<K, V>: TypedVariable<Key<'a> = K, Value<'a> = V> + Send + Sync + Clone + 'static,
Source§type Parser = VariableParser<Variable<K, V>>
type Parser = VariableParser<Variable<K, V>>
Generated parser, usually
ValueParser
. Read moreSource§fn value_parser() -> Self::Parser
fn value_parser() -> Self::Parser
Create the specified
Self::Parser
impl<K: Eq, V: Eq> Eq for Variable<K, V>
impl<K: Send, V: Send> Send for Variable<K, V>
impl<K, V> StructuralPartialEq for Variable<K, V>
impl<K: Send, V: Sync> Sync for Variable<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for Variable<K, V>
impl<K, V> RefUnwindSafe for Variable<K, V>where
V: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, V> Unpin for Variable<K, V>
impl<K, V> UnwindSafe for Variable<K, V>where
V: UnwindSafe,
K: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more