pub trait TupleOrVec<E> {
// Required method
fn as_vec(self) -> Vec<E>;
}Expand description
A trait implemented on repeated tuples and vectors.
This trait has already been covered in the crate-level documentation, so its coverage here will be brief.
This trait is implemented for all repeated tuples and all vectors, and
serves as a drop-in replacement for functions that take vectors as
arguments (albeit with some conversion). Types that were Vec<T> should be
converted to generic types that implement TupleOrVec<T>.
TupleOrVec is not designed with the intent of being implementable, but
there’s nothing stopping you from doing so.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".