Enum rune::ast::ItemVariantBody [−][src]
An item body declaration.
Variants
An empty enum body.
TupleBody(Parenthesized<Field, Comma>)
A tuple struct body.
A regular struct body.
Implementations
impl ItemVariantBody
[src]
pub fn fields(&self) -> impl Iterator<Item = &(Field, Option<Comma>)>
[src]
Iterate over the fields of the body.
Trait Implementations
impl Clone for ItemVariantBody
[src]
fn clone(&self) -> ItemVariantBody
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ItemVariantBody
[src]
impl Eq for ItemVariantBody
[src]
impl OptionSpanned for ItemVariantBody
[src]
fn option_span(&self) -> Option<Span>
[src]
impl Parse for ItemVariantBody
[src]
Parse implementation for a struct body.
Examples
use rune::{testing, ast}; testing::roundtrip::<ast::ItemVariantBody>("( a, b, c )"); testing::roundtrip::<ast::ItemVariantBody>("{ a, b, c }"); testing::roundtrip::<ast::ItemVariantBody>("( #[serde(default)] a, b, c )"); testing::roundtrip::<ast::ItemVariantBody>("{ a, #[debug(skip)] b, c }");
fn parse(p: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl PartialEq<ItemVariantBody> for ItemVariantBody
[src]
fn eq(&self, other: &ItemVariantBody) -> bool
[src]
fn ne(&self, other: &ItemVariantBody) -> bool
[src]
impl StructuralEq for ItemVariantBody
[src]
impl StructuralPartialEq for ItemVariantBody
[src]
impl ToTokens for ItemVariantBody
[src]
fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for ItemVariantBody
impl Send for ItemVariantBody
impl Sync for ItemVariantBody
impl Unpin for ItemVariantBody
impl UnwindSafe for ItemVariantBody
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>,