Enum segment_tree::maybe_owned::MaybeOwned [] [src]

pub enum MaybeOwned<'a, T: 'a> {
    Borrowed(&'a T),
    Owned(T),
}

A variant of Cow that doesn't require Clone.

Variants

Methods

impl<'a, T: 'a> MaybeOwned<'a, T>
[src]

Get a reference to the contained value.

impl<'a, T: 'a + Clone> MaybeOwned<'a, T>
[src]

Get the value, cloning if necessary.

Trait Implementations

impl<'a, T: 'a + Debug> Debug for MaybeOwned<'a, T>
[src]

Formats the value using the given formatter.

impl<'a, T: 'a + Display> Display for MaybeOwned<'a, T>
[src]

Formats the value using the given formatter. Read more

impl<'a, T: 'a + PartialEq> PartialEq for MaybeOwned<'a, T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a, T: 'a + Eq> Eq for MaybeOwned<'a, T>
[src]

impl<'a, T: 'a + PartialOrd> PartialOrd for MaybeOwned<'a, T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, T: 'a + Ord> Ord for MaybeOwned<'a, T>
[src]

This method returns an Ordering between self and other. Read more

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the maximum of two values. Read more

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the minimum of two values. Read more

impl<'a, T: 'a + Default> Default for MaybeOwned<'a, T>
[src]

Returns the "default value" for a type. Read more

impl<'a, T: 'a + Hash> Hash for MaybeOwned<'a, T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more