Struct LocalInit

struct LocalInit { ... }

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>)>

Implementations

impl Clone for LocalInit

fn clone(self: &Self) -> Self

impl Debug for LocalInit

fn fmt(self: &Self, formatter: &mut Formatter<'_>) -> Result

impl Eq for LocalInit

impl Freeze for LocalInit

impl Hash for LocalInit

fn hash<H>(self: &Self, state: &mut H)
where
    H: Hasher

impl PartialEq for LocalInit

fn eq(self: &Self, other: &Self) -> bool

impl RefUnwindSafe for LocalInit

impl Send for LocalInit

impl Sync for LocalInit

impl Unpin for LocalInit

impl UnsafeUnpin for LocalInit

impl UnwindSafe for LocalInit

impl<T> Any for LocalInit

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for LocalInit

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for LocalInit

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for LocalInit

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for LocalInit

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for LocalInit

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for LocalInit

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for LocalInit

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for LocalInit

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>