moveit::newFunction from
Source pub fn from<T: From<U>, U>(val: U) -> impl New<Output = T>
Expand description
Returns a New
that uses a From
implementation to generate a T
.
moveit! {
let x: Pin<MoveRef<String>> = new::from("foo");
}
assert_eq!(*x, "foo");