Enum syntax::ext::base::Annotatable [−][src]
pub enum Annotatable { Item(P<Item>), TraitItem(P<TraitItem>), ImplItem(P<ImplItem>), ForeignItem(P<ForeignItem>), Stmt(P<Stmt>), Expr(P<Expr>), }
Variants
Item(P<Item>)
TraitItem(P<TraitItem>)
ImplItem(P<ImplItem>)
ForeignItem(P<ForeignItem>)
Stmt(P<Stmt>)
Expr(P<Expr>)
Methods
impl Annotatable
[src]
impl Annotatable
pub fn span(&self) -> Span
[src]
pub fn span(&self) -> Span
pub fn expect_item(self) -> P<Item>
[src]
pub fn expect_item(self) -> P<Item>
pub fn map_item_or<F, G>(self, f: F, or: G) -> Annotatable where
F: FnMut(P<Item>) -> P<Item>,
G: FnMut(Annotatable) -> Annotatable,
[src]
pub fn map_item_or<F, G>(self, f: F, or: G) -> Annotatable where
F: FnMut(P<Item>) -> P<Item>,
G: FnMut(Annotatable) -> Annotatable,
pub fn expect_trait_item(self) -> TraitItem
[src]
pub fn expect_trait_item(self) -> TraitItem
pub fn expect_impl_item(self) -> ImplItem
[src]
pub fn expect_impl_item(self) -> ImplItem
pub fn expect_foreign_item(self) -> ForeignItem
[src]
pub fn expect_foreign_item(self) -> ForeignItem
pub fn expect_stmt(self) -> Stmt
[src]
pub fn expect_stmt(self) -> Stmt
pub fn expect_expr(self) -> P<Expr>
[src]
pub fn expect_expr(self) -> P<Expr>
pub fn derive_allowed(&self) -> bool
[src]
pub fn derive_allowed(&self) -> bool
Trait Implementations
impl Debug for Annotatable
[src]
impl Debug for Annotatable
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Annotatable
[src]
impl Clone for Annotatable
fn clone(&self) -> Annotatable
[src]
fn clone(&self) -> Annotatable
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl HasAttrs for Annotatable
[src]
impl HasAttrs for Annotatable
fn attrs(&self) -> &[Attribute]
[src]
fn attrs(&self) -> &[Attribute]
fn map_attrs<F: FnOnce(Vec<Attribute>) -> Vec<Attribute>>(self, f: F) -> Self
[src]
fn map_attrs<F: FnOnce(Vec<Attribute>) -> Vec<Attribute>>(self, f: F) -> Self
impl Into<Vec<Annotatable>> for Annotatable
[src]
impl Into<Vec<Annotatable>> for Annotatable
Auto Trait Implementations
impl !Send for Annotatable
impl !Send for Annotatable
impl !Sync for Annotatable
impl !Sync for Annotatable