[−][src]Struct rune::ast::ExprLet
A let expression let <name> = <expr>;
Examples
use rune::{testing, ast}; testing::roundtrip::<ast::ExprLet>("let x = 1"); testing::roundtrip::<ast::ExprLet>("#[attr] let a = f()");
Fields
attributes: Vec<Attribute>
The attributes for the let expression
let_token: Let
The let
keyword.
pat: Pat
The name of the binding.
eq: Eq
The equality keyword.
expr: Expr
The expression the binding is assigned to.
Implementations
impl ExprLet
[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 with the given meta.
pub fn parse_without_eager_brace(
parser: &mut Parser<'_>
) -> Result<Self, ParseError>
[src]
parser: &mut Parser<'_>
) -> Result<Self, ParseError>
Parse a let expression without eager bracing.
Trait Implementations
impl Clone for ExprLet
[src]
impl Debug for ExprLet
[src]
impl Eq for ExprLet
[src]
impl Parse for ExprLet
[src]
pub fn parse(p: &mut Parser<'_>) -> Result<Self, ParseError>
[src]
impl PartialEq<ExprLet> for ExprLet
[src]
impl Spanned for ExprLet
[src]
impl StructuralEq for ExprLet
[src]
impl StructuralPartialEq for ExprLet
[src]
impl ToTokens for ExprLet
[src]
pub fn to_tokens(&self, context: &MacroContext, stream: &mut TokenStream)
[src]
Auto Trait Implementations
impl RefUnwindSafe for ExprLet
[src]
impl Send for ExprLet
[src]
impl Sync for ExprLet
[src]
impl Unpin for ExprLet
[src]
impl UnwindSafe for ExprLet
[src]
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>,