pub struct LocalInit {
pub eq_token: Eq,
pub expr: Box<Expr>,
pub diverge: Option<(Else, Box<Expr>)>,
}
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§
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)