Enum reproto_core::RpReg
[−]
[src]
pub enum RpReg { Type(Rc<Loc<RpTypeBody>>), Tuple(Rc<Loc<RpTupleBody>>), Interface(Rc<Loc<RpInterfaceBody>>), SubType(Rc<Loc<RpInterfaceBody>>, Rc<Loc<RpSubType>>), Enum(Rc<Loc<RpEnumBody>>), EnumVariant(Rc<Loc<RpEnumBody>>, Rc<Loc<RpVariant>>), Service(Rc<Loc<RpServiceBody>>), }
Variants
Type(Rc<Loc<RpTypeBody>>)
Tuple(Rc<Loc<RpTupleBody>>)
Interface(Rc<Loc<RpInterfaceBody>>)
SubType(Rc<Loc<RpInterfaceBody>>, Rc<Loc<RpSubType>>)
Enum(Rc<Loc<RpEnumBody>>)
EnumVariant(Rc<Loc<RpEnumBody>>, Rc<Loc<RpVariant>>)
Service(Rc<Loc<RpServiceBody>>)
Methods
impl RpReg
[src]
pub fn name(&self) -> &RpName
[src]
Get the name of the registered declaration.
pub fn pos(&self) -> &Pos
[src]
Get the location of the registered declaration.
pub fn fields<'a>(&'a self) -> Result<Box<Iterator<Item = &Loc<RpField>> + 'a>>
[src]
pub fn local_name<PackageFn, InnerFn>(
&self,
name: &RpName,
package_fn: PackageFn,
inner_fn: InnerFn
) -> String where
PackageFn: Fn(Vec<&str>) -> String,
InnerFn: Fn(Vec<&str>) -> String,
[src]
&self,
name: &RpName,
package_fn: PackageFn,
inner_fn: InnerFn
) -> String where
PackageFn: Fn(Vec<&str>) -> String,
InnerFn: Fn(Vec<&str>) -> String,
pub fn kind(&self) -> (&str, Option<&RpReg>)
[src]
Get stringy kind of the registered type, if applicable.
This returns the base kind as the first member of the tuple. Then the registered type as the second (if applicable).
pub fn is_enum(&self) -> bool
[src]
Check if registered type is an enum.
Trait Implementations
impl Debug for RpReg
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for RpReg
[src]
fn clone(&self) -> RpReg
[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