Enum graphviz::maybe_owned_vec::MaybeOwnedVector[src]
pub enum MaybeOwnedVector<'a, T> {
Growable(Vec<T>),
Borrowed(&'a [T]),
}MaybeOwnedVector<'a,T> abstracts over Vec<T>, &'a [T].
Some clients will have a pre-allocated vector ready to hand off in
a slice; others will want to create the set on the fly and hand
off ownership, via Growable.
Variants
Growable | |
Borrowed |
Methods
impl<'a, T> MaybeOwnedVector<'a, T>
impl<'a, T: Clone> MaybeOwnedVector<'a, T>
Trait Implementations
impl<'b, T> Vector<T> for MaybeOwnedVector<'b, T>
impl<'a, T> FromIterator<T> for MaybeOwnedVector<'a, T>
fn from_iter<I: Iterator<T>>(iterator: I) -> MaybeOwnedVector<T>
impl<'a, T: Show> Show for MaybeOwnedVector<'a, T>
impl<'a, T: Clone> CloneableVector<T> for MaybeOwnedVector<'a, T>
fn to_owned(&self) -> Vec<T>
Returns a copy of self.
fn into_owned(self) -> Vec<T>
Convert self into an owned slice, not making a copy if possible.