[][src]Macro clone_block::clone

macro_rules! clone {
    ($($var:ident),+ ; $expr:expr) => { ... };
}

Example

use clone_block::clone;
use std::thread;

let foo = "foo".to_string();

let thread = thread::spawn(
    clone!(foo; move || {
        let foobar = format!("{}bar", foo);
        foobar
    })
);

let foobar = thread.join();
let foobaz = format!("{}baz", foo);