pub trait TupleInto<T> {
// Required method
fn tuple_into(self) -> T;
}Expand description
A trait for infallibly converting a tuple into another tuple type.
This trait allows converting tuples into other tuple types where each element can be converted
using the standard From trait. Unlike TupleTryInto, this trait guarantees
that the conversion will succeed.
Part of the tuplities crate.
Required Methods§
Sourcefn tuple_into(self) -> T
fn tuple_into(self) -> T
Converts self into T.
§Examples
use tuplities_from::TupleInto;
let source = (1u8, 2u8);
let target: (u32, u32) = TupleInto::tuple_into(source);
assert_eq!(target, (1, 2));