pub struct LocalInit {
pub eq_token: Eq,
pub expr: Box<Expr>,
pub diverge: Option<(Else, Box<Expr>)>,
}
Available on crate feature
full
only.Expand description
The expression assigned in a local let
binding, including optional
diverging else
block.
LocalInit
represents = s.parse()?
in let x: u64 = s.parse()?
and
= r else { return }
in let Ok(x) = r else { return }
.
Fields§
§eq_token: Eq
§expr: Box<Expr>
§diverge: Option<(Else, Box<Expr>)>
Trait Implementations§
impl Eq for LocalInit
Available on crate feature
extra-traits
only.Auto Trait Implementations§
impl Freeze for LocalInit
impl RefUnwindSafe for LocalInit
impl !Send for LocalInit
impl !Sync for LocalInit
impl Unpin for LocalInit
impl UnwindSafe for LocalInit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes