pub trait CopyableVector<T> { fn to_owned(&self) -> ~[T]; fn into_owned(self) -> ~[T]; }
Extension methods for vector slices with copyable elements
fn to_owned(&self) -> ~[T]
Copy self
into a new owned vector
fn into_owned(self) -> ~[T]
Convert self
into a owned vector, not making a copy if possible.
impl<'self, T: Clone> CopyableVector<T> for &'self [T]
impl<T: Clone> CopyableVector<T> for ~[T]
impl<T: Clone> CopyableVector<T> for @[T]
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).