Can I mem::swap two arguments

fn swap(arg1: &mut A, arg2: &mut A) {
    mem::swap(arg1, arg2);
    // Some actions
    mem::swap(arg2, arg1);
}

Can I do it?

Sure. This works just fine, as long as you declare the generic type A:

fn swap<A>(...

Full running program: Rust Playground

Good. Thanks.