Enum graphviz::maybe_owned_vec::MaybeOwnedVectorDeprecated [-]  [+] [src]

pub enum MaybeOwnedVector<'a, T: 'a> {
    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>

fn iter(&'a self) -> Iter<'a, T>

fn len(&self) -> uint

fn is_empty(&self) -> bool

impl<'a, T: Clone> MaybeOwnedVector<'a, T>

fn into_vec(self) -> Vec<T>

Convert self into a growable Vec, not making a copy if possible.

Trait Implementations

impl<'a, T: PartialEq> PartialEq for MaybeOwnedVector<'a, T>

fn eq(&self, other: &MaybeOwnedVector<T>) -> bool

fn ne(&self, other: &Rhs) -> bool

impl<'a, T: Eq> Eq for MaybeOwnedVector<'a, T>

fn assert_receiver_is_total_eq(&self)

impl<'a, T: PartialOrd> PartialOrd for MaybeOwnedVector<'a, T>

fn partial_cmp(&self, other: &MaybeOwnedVector<T>) -> Option<Ordering>

fn lt(&self, other: &Rhs) -> bool

fn le(&self, other: &Rhs) -> bool

fn gt(&self, other: &Rhs) -> bool

fn ge(&self, other: &Rhs) -> bool

impl<'a, T: Ord> Ord for MaybeOwnedVector<'a, T>

fn cmp(&self, other: &MaybeOwnedVector<T>) -> Ordering

impl<'a, T: PartialEq, V: AsSlice<T> + ?Sized> Equiv<V> for MaybeOwnedVector<'a, T>

fn equiv(&self, other: &V) -> bool

impl<'b, T> AsSlice<T> for MaybeOwnedVector<'b, T>

fn as_slice<'a>(&'a self) -> &'a [T]

impl<'a, T> FromIterator<T> for MaybeOwnedVector<'a, T>

fn from_iter<I: Iterator<T>>(iterator: I) -> MaybeOwnedVector<'a, T>

impl<'a, T: Show> Show for MaybeOwnedVector<'a, T>

fn fmt(&self, f: &mut Formatter) -> Result

impl<'a, T: Clone> Clone for MaybeOwnedVector<'a, T>

fn clone(&self) -> MaybeOwnedVector<'a, T>

fn clone_from(&mut self, source: &Self)

impl<'a, T> Default for MaybeOwnedVector<'a, T>

fn default() -> MaybeOwnedVector<'a, T>

impl<'a> BytesContainer for MaybeOwnedVector<'a, u8>

fn container_as_bytes(&self) -> &[u8]

fn container_as_str(&'a self) -> Option<&'a str>

fn is_str(Option<&Self>) -> bool