Enum reproto_core::RpDecl
[−]
[src]
pub enum RpDecl<F: 'static> where
F: Flavor, { Type(Loc<RpTypeBody<F>>), Tuple(Loc<RpTupleBody<F>>), Interface(Loc<RpInterfaceBody<F>>), Enum(Loc<RpEnumBody<F>>), Service(Loc<RpServiceBody<F>>), }
Variants
Type(Loc<RpTypeBody<F>>)
Tuple(Loc<RpTupleBody<F>>)
Interface(Loc<RpInterfaceBody<F>>)
Enum(Loc<RpEnumBody<F>>)
Service(Loc<RpServiceBody<F>>)
Methods
impl<F: 'static> RpDecl<F> where
F: Flavor,
[src]
F: Flavor,
pub fn decls(&self) -> Decls<F>
[src]
pub fn ident(&self) -> &str
[src]
pub fn name(&self) -> &F::Name
[src]
pub fn comment(&self) -> &[String]
[src]
pub fn to_reg(&self) -> Vec<(&F::Name, &Pos, RpReg)>
[src]
Convert a declaration into its registered types.
pub fn to_named(&self) -> Vec<RpNamed<F>>
[src]
Convert a declaration into its names.
pub fn kind(&self) -> &str
[src]
Get stringy kind of the declaration.
pub fn pos(&self) -> &Pos
[src]
Get the position of the declaration.
Trait Implementations
impl<F: Debug + 'static> Debug for RpDecl<F> where
F: Flavor,
[src]
F: Flavor,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F: Clone + 'static> Clone for RpDecl<F> where
F: Flavor,
[src]
F: Flavor,
fn clone(&self) -> RpDecl<F>
[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: 'static, T> Translate<T> for RpDecl<F> where
F: Flavor,
T: Translator<Source = F>,
[src]
F: Flavor,
T: Translator<Source = F>,
type Source = F
type Out = RpDecl<T::Target>
fn translate(self, translator: &T) -> Result<RpDecl<T::Target>>
[src]
Translate into different flavor.
impl<F: 'static> Display for RpDecl<F> where
F: Flavor,
[src]
F: Flavor,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a, F: 'static> From<&'a RpDecl<F>> for Pos where
F: Flavor,
[src]
F: Flavor,