pub enum LambdaCaptureKind {
DefaultRef,
DefaultCopy,
ByRef(String),
ByCopy(String),
Init {
name: String,
is_move: bool,
},
This,
ThisCopy,
}Expand description
Represents a lambda capture
Variants§
DefaultRef
& - default reference capture
DefaultCopy
[=] - default copy capture
ByRef(String)
[&x] - explicit reference capture
ByCopy(String)
[x] - explicit copy capture
Init
[x = expr] - init capture (includes move captures)
This
[this] - captures this pointer
ThisCopy
[*this] - captures this by copy (C++17)
Trait Implementations§
Source§impl Clone for LambdaCaptureKind
impl Clone for LambdaCaptureKind
Source§fn clone(&self) -> LambdaCaptureKind
fn clone(&self) -> LambdaCaptureKind
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for LambdaCaptureKind
impl RefUnwindSafe for LambdaCaptureKind
impl Send for LambdaCaptureKind
impl Sync for LambdaCaptureKind
impl Unpin for LambdaCaptureKind
impl UnwindSafe for LambdaCaptureKind
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