[][src]Enum fastobo::share::Cow

pub enum Cow<'a, B> where
    B: 'a + Redeem<'a>, 
{ Borrowed(B), Owned(<B as Redeem<'a>>::Owned), }

Variants

Borrowed(B)

Borrowed data.

Owned(<B as Redeem<'a>>::Owned)

Owned data.

Trait Implementations

impl<'i> FromPair<'i> for Cow<'i, IdLocal<'i>>[src]

fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, Error>[src]

Create a new instance from a Pair.

impl<'i> FromPair<'i> for Cow<'i, IdPrefix<'i>>[src]

fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, Error>[src]

Create a new instance from a Pair.

impl<'i> FromPair<'i> for Cow<'i, PrefixedId<'i>>[src]

fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, Error>[src]

Create a new instance from a Pair.

impl<'i> FromPair<'i> for Cow<'i, &'i UnprefixedId>[src]

fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, Error>[src]

Create a new instance from a Pair.

impl<'i> FromPair<'i> for Cow<'i, &'i QuotedStr>[src]

fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, Error>[src]

Create a new instance from a Pair.

impl<'i> FromPair<'i> for Cow<'i, &'i UnquotedStr>[src]

fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, Error>[src]

Create a new instance from a Pair.

impl<'i> FromSlice<'i> for Cow<'i, IdLocal<'i>>[src]

type Err = Error

The associated error which can be returned from parsing.

impl<'i> FromSlice<'i> for Cow<'i, IdPrefix<'i>>[src]

type Err = Error

The associated error which can be returned from parsing.

impl<'i> FromSlice<'i> for Cow<'i, PrefixedId<'i>>[src]

type Err = Error

The associated error which can be returned from parsing.

impl<'i> FromSlice<'i> for Cow<'i, &'i UnprefixedId>[src]

type Err = Error

The associated error which can be returned from parsing.

impl<'i> FromSlice<'i> for Cow<'i, &'i QuotedStr>[src]

type Err = Error

The associated error which can be returned from parsing.

impl<'i> FromSlice<'i> for Cow<'i, &'i UnquotedStr>[src]

type Err = Error

The associated error which can be returned from parsing.

impl<'a, B> Share<'a, B> for Cow<'a, B> where
    B: Redeem<'a> + Clone,
    <B as Redeem<'a>>::Owned: Share<'a, B>, 
[src]

impl<'a, B> Redeem<'a> for Cow<'a, B> where
    B: Redeem<'a>,
    <B as Redeem<'a>>::Owned: Clone
[src]

type Owned = <B as Redeem<'a>>::Owned

impl<'a, B> Clone for Cow<'a, B> where
    B: Clone + Redeem<'a>,
    <B as Redeem<'a>>::Owned: Clone
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a, B> From<&'a B> for Cow<'a, &'a B> where
    &'a B: Redeem<'a>, 
[src]

impl<'a> From<&'a str> for Cow<'a, &'a str>[src]

impl<'a> From<String> for Cow<'a, &'a str>[src]

impl<'a> Eq for Cow<'a, &'a str>[src]

impl<'a> PartialEq<str> for Cow<'a, &'a str>[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a> PartialEq<Cow<'a, &'a str>> for Cow<'a, &'a str>[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a> Deref for Cow<'a, &'a str>[src]

type Target = str

The resulting type after dereferencing.

impl<'a, B> Debug for Cow<'a, B> where
    B: Debug + Redeem<'a>,
    <B as Redeem<'a>>::Owned: Debug
[src]

impl<'a, B> Display for Cow<'a, B> where
    B: Display + Redeem<'a>,
    <B as Redeem<'a>>::Owned: Display
[src]

impl<'a, B> Hash for Cow<'a, B> where
    B: Hash + Redeem<'a>,
    <B as Redeem<'a>>::Owned: Hash
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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

Auto Trait Implementations

impl<'a, B> Send for Cow<'a, B> where
    B: Send,
    <B as Redeem<'a>>::Owned: Send

impl<'a, B> Sync for Cow<'a, B> where
    B: Sync,
    <B as Redeem<'a>>::Owned: Sync

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]