Struct rune::ast::Attribute [−][src]
Attribute like #[derive(Debug)]
Fields
hash: Pound
The #
character
style: AttrStyle
Specify if the attribute is outer #!
or inner #
open: OpenBracket
The [
character
path: Path
The path of the attribute
input: TokenStream
The input to the input of the attribute
close: CloseBracket
The ]
character
Trait Implementations
impl Clone for Attribute
[src]
impl Debug for Attribute
[src]
impl Eq for Attribute
[src]
impl Parse for Attribute
[src]
Parsing an Attribute
Examples
use rune::{testing, ast}; testing::roundtrip::<ast::Attribute>("#[foo = \"foo\"]"); testing::roundtrip::<ast::Attribute>("#[foo()]"); testing::roundtrip::<ast::Attribute>("#![foo]"); testing::roundtrip::<ast::Attribute>("#![cfg(all(feature = \"potato\"))]"); testing::roundtrip::<ast::Attribute>("#[x+1]");
fn parse(p: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl PartialEq<Attribute> for Attribute
[src]
impl Peek for Attribute
[src]
impl Spanned for Attribute
[src]
impl StructuralEq for Attribute
[src]
impl StructuralPartialEq for Attribute
[src]
impl ToTokens for Attribute
[src]
fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
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>,