Enum rune::ast::Item [−][src]
A declaration.
Variants
A use declaration.
A function declaration.
An enum declaration.
Struct(Box<ItemStruct>)
A struct declaration.
An impl declaration.
A module declaration.
A const declaration.
A macro call expanding into an item.
Implementations
impl Item
[src]
pub fn needs_semi_colon(&self) -> bool
[src]
Indicates if the declaration needs a semi-colon or not.
pub fn take_attributes(&mut self) -> Vec<Attribute>
[src]
Take the attributes associated with the item.
pub fn attributes(&self) -> &[Attribute]
[src]
Test if the item has any attributes
pub fn peek_as_item(p: &mut Peeker<'_>, path: Option<&Path>) -> bool
[src]
Test if declaration is suitable inside of a file.
pub fn parse_with_meta_path(
p: &mut Parser<'_>,
attributes: Vec<Attribute>,
visibility: Visibility,
path: Option<Path>
) -> Result<Self, ParseError>
[src]
p: &mut Parser<'_>,
attributes: Vec<Attribute>,
visibility: Visibility,
path: Option<Path>
) -> Result<Self, ParseError>
Parse an Item attaching the given meta and optional path.
Trait Implementations
impl Clone for Item
[src]
impl Debug for Item
[src]
impl Eq for Item
[src]
impl Parse for Item
[src]
fn parse(p: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl PartialEq<Item> for Item
[src]
impl Spanned for Item
[src]
impl StructuralEq for Item
[src]
impl StructuralPartialEq for Item
[src]
impl ToTokens for Item
[src]
fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,