Struct reproto_core::RpVariant
[−]
[src]
pub struct RpVariant<F: 'static, V> where
F: Flavor, { pub name: F::Name, pub ident: Loc<String>, pub comment: Vec<String>, pub value: V, }
Variant in an enum.
Fields
name: F::Name
ident: Loc<String>
comment: Vec<String>
value: V
Methods
impl<'a, F: 'static, V> RpVariant<F, V> where
F: Flavor,
[src]
F: Flavor,
impl<'a, F: 'static, V: 'a> RpVariant<F, V> where
F: Flavor,
RpVariantValue<'a>: From<&'a V>,
[src]
F: Flavor,
RpVariantValue<'a>: From<&'a V>,
pub fn value(&'a self) -> RpVariantValue<'a>
[src]
Convert into a variant value.
Trait Implementations
impl<F: Debug + 'static, V: Debug> Debug for RpVariant<F, V> where
F: Flavor,
F::Name: Debug,
[src]
F: Flavor,
F::Name: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F: Clone + 'static, V: Clone> Clone for RpVariant<F, V> where
F: Flavor,
F::Name: Clone,
[src]
F: Flavor,
F::Name: Clone,
fn clone(&self) -> RpVariant<F, V>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<F: PartialEq + 'static, V: PartialEq> PartialEq for RpVariant<F, V> where
F: Flavor,
F::Name: PartialEq,
[src]
F: Flavor,
F::Name: PartialEq,
fn eq(&self, __arg_0: &RpVariant<F, V>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RpVariant<F, V>) -> bool
[src]
This method tests for !=
.
impl<F: Eq + 'static, V: Eq> Eq for RpVariant<F, V> where
F: Flavor,
F::Name: Eq,
[src]
F: Flavor,
F::Name: Eq,
impl<F: 'static, T, V> Translate<T> for RpVariant<F, V> where
F: Flavor,
T: Translator<Source = F>,
[src]
F: Flavor,
T: Translator<Source = F>,