Struct rune::ast::ExprReturn [−][src]
A return expression return [expr]
.
use rune::{testing, ast}; testing::roundtrip::<ast::ExprReturn>("return"); testing::roundtrip::<ast::ExprReturn>("return 42"); testing::roundtrip::<ast::ExprReturn>("#[attr] return 42");
Fields
attributes: Vec<Attribute>
The attributes of the return
statement.
return_token: Return
The return token.
expr: Option<Expr>
An optional expression to return.
Implementations
impl ExprReturn
[src]
pub fn parse_with_meta(
parser: &mut Parser<'_>,
attributes: Vec<Attribute>
) -> Result<Self, ParseError>
[src]
parser: &mut Parser<'_>,
attributes: Vec<Attribute>
) -> Result<Self, ParseError>
Parse #ident and attach the given meta
Trait Implementations
impl Clone for ExprReturn
[src]
fn clone(&self) -> ExprReturn
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ExprReturn
[src]
impl Eq for ExprReturn
[src]
impl Parse for ExprReturn
[src]
fn parse(p: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl PartialEq<ExprReturn> for ExprReturn
[src]
fn eq(&self, other: &ExprReturn) -> bool
[src]
fn ne(&self, other: &ExprReturn) -> bool
[src]
impl Spanned for ExprReturn
[src]
impl StructuralEq for ExprReturn
[src]
impl StructuralPartialEq for ExprReturn
[src]
impl ToTokens for ExprReturn
[src]
fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for ExprReturn
impl Send for ExprReturn
impl Sync for ExprReturn
impl Unpin for ExprReturn
impl UnwindSafe for ExprReturn
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>,