Enum datafu::RefOwn[][src]

pub enum RefOwn<'b, T: ?Sized, U> {
    Ref(&'b T),
    Str(&'b str),
    Own(U),
}

A borrowed or owned value of various types.

This exists purely as a workaround for Rust not having GATs yet.

Variants

Ref(&'b T)

Borrowed T.

Str(&'b str)

Borrowed string.

Own(U)

Owned U.

Trait Implementations

impl<'b, T: ?Sized, U: Clone> Clone for RefOwn<'b, T, U>[src]

impl<'b, T: ?Sized, U: Copy> Copy for RefOwn<'b, T, U>[src]

impl<'b, T: Debug + ?Sized, U: Debug> Debug for RefOwn<'b, T, U>[src]

impl<'b, T, U> From<&'b T> for RefOwn<'b, T, U>[src]

impl<'b, T: ?Sized, U> PartialEq<RefOwn<'b, T, U>> for RefOwn<'b, T, U> where
    T: PartialEq<T> + PartialEq<U> + PartialEq<str>,
    U: PartialEq<T> + PartialEq<U> + PartialEq<str>,
    str: PartialEq<T> + PartialEq<U> + PartialEq<str>, 
[src]

Auto Trait Implementations

impl<'b, T: ?Sized, U> RefUnwindSafe for RefOwn<'b, T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

impl<'b, T: ?Sized, U> Send for RefOwn<'b, T, U> where
    T: Sync,
    U: Send

impl<'b, T: ?Sized, U> Sync for RefOwn<'b, T, U> where
    T: Sync,
    U: Sync

impl<'b, T: ?Sized, U> Unpin for RefOwn<'b, T, U> where
    U: Unpin

impl<'b, T: ?Sized, U> UnwindSafe for RefOwn<'b, T, U> where
    T: RefUnwindSafe,
    U: UnwindSafe

Blanket Implementations

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

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

impl<T> BorrowMut<T> for T where
    T: ?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.