Function tupleops::ref_mut_tuple [−][src]
pub fn ref_mut_tuple<'a, Tpl>(tpl: &'a mut Tpl) -> RefMutTuple<'a, Tpl> where
&'a mut Tpl: TupleRefMut<'a, Tpl>,
This is supported on crate feature
ref-mut
only.Expand description
Turn a reference to a mutable tuple into a tuple of mutable references.
use tupleops::ref_mut_tuple;
assert_eq!(
ref_mut_tuple(&mut (1, 2, 3)),
(&mut 1, &mut 2, &mut 3),
);
See also: RefMutTuple, TupleRefMut.