moveit::new

Function of

Source
pub fn of<T>(val: T) -> impl New<Output = T>
Expand description

Returns a New that simply returns the given value.

moveit! {
  let x = new::of(42);
}
assert_eq!(*x, 42);

In general, you will almost always want from().