pub enum DestructureRest<'a, T> {
Unnamed,
Named {
variable: Spanned<'a>,
ty: Option<Spanned<'a, T>>,
},
}
Expand description
Rest syntax, such as ...rest
in (a, ...rest, b)
.
Variants§
Implementations§
source§impl<'a, T> DestructureRest<'a, T>
impl<'a, T> DestructureRest<'a, T>
sourcepub fn to_lvalue(&self) -> Option<SpannedLvalue<'a, T>>
pub fn to_lvalue(&self) -> Option<SpannedLvalue<'a, T>>
Tries to convert this rest declaration into an lvalue. Return None
if the rest declaration
is unnamed.
Trait Implementations§
source§impl<'a, T: Clone> Clone for DestructureRest<'a, T>
impl<'a, T: Clone> Clone for DestructureRest<'a, T>
source§fn clone(&self) -> DestructureRest<'a, T>
fn clone(&self) -> DestructureRest<'a, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, T: Debug> Debug for DestructureRest<'a, T>
impl<'a, T: Debug> Debug for DestructureRest<'a, T>
source§impl<'a, T: PartialEq> PartialEq for DestructureRest<'a, T>
impl<'a, T: PartialEq> PartialEq for DestructureRest<'a, T>
source§fn eq(&self, other: &DestructureRest<'a, T>) -> bool
fn eq(&self, other: &DestructureRest<'a, T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a, T> StructuralPartialEq for DestructureRest<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for DestructureRest<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for DestructureRest<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for DestructureRest<'a, T>where
T: Send,
impl<'a, T> Sync for DestructureRest<'a, T>where
T: Sync,
impl<'a, T> Unpin for DestructureRest<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for DestructureRest<'a, T>where
T: UnwindSafe,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)