[][src]Enum as_is::Is

pub enum Is<'a, T: ?Sized> where
    T: ToOwned
{ Owned(T::Owned), Borrowed(&'a T), MutBorrowed(&'a mut T), }

Represents an owned, an immutably borrowed, or a mutably borrowed data.

Variants

Owned(T::Owned)

Owned data.

Borrowed(&'a T)

Immutably borrowed data.

MutBorrowed(&'a mut T)

Mutably borrowed data.

Trait Implementations

impl<T: ?Sized, U, O, '_> Add<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: Add<Owned<U>, Output = O> + Add<&'a U::Is, Output = O>,
    &'a T: Add<Owned<U>, Output = O> + Add<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the + operator.

impl<T: ?Sized, '_> AsIs for Is<'_, T> where
    T: ToOwned
[src]

type Is = T

The base type associated with both owned and borrowed data.

impl<T: ?Sized, U: ?Sized, '_> AsRef<U> for Is<'_, T> where
    T: ToOwned + AsRef<U>, 
[src]

impl<T: ?Sized, '_> Binary for Is<'_, T> where
    T: ToOwned + Binary
[src]

impl<T: ?Sized, U, O, '_> BitAnd<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: BitAnd<Owned<U>, Output = O> + BitAnd<&'a U::Is, Output = O>,
    &'a T: BitAnd<Owned<U>, Output = O> + BitAnd<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the & operator.

impl<T: ?Sized, U, O, '_> BitOr<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: BitOr<Owned<U>, Output = O> + BitOr<&'a U::Is, Output = O>,
    &'a T: BitOr<Owned<U>, Output = O> + BitOr<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the | operator.

impl<T: ?Sized, U, O, '_> BitXor<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: BitXor<Owned<U>, Output = O> + BitXor<&'a U::Is, Output = O>,
    &'a T: BitXor<Owned<U>, Output = O> + BitXor<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the ^ operator.

impl<T: ?Sized, '_> Borrow<T> for Is<'_, T> where
    T: ToOwned
[src]

impl<T: ?Sized, '_> Clone for Is<'_, T> where
    T: ToOwned,
    T::Owned: Clone
[src]

impl<'a, T: Debug + ?Sized> Debug for Is<'a, T> where
    T: ToOwned,
    T::Owned: Debug
[src]

impl<T: ?Sized, '_> Default for Is<'_, T> where
    T: ToOwned,
    T::Owned: Default
[src]

fn default() -> Self[src]

Creates an owned Is<'a, T> with the default value for T::Owned.

impl<T: ?Sized, '_> Deref for Is<'_, T> where
    T: ToOwned
[src]

type Target = T

The resulting type after dereferencing.

impl<T: ?Sized, '_> Display for Is<'_, T> where
    T: ToOwned + Display
[src]

impl<T: ?Sized, U, O, '_> Div<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: Div<Owned<U>, Output = O> + Div<&'a U::Is, Output = O>,
    &'a T: Div<Owned<U>, Output = O> + Div<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the / operator.

impl<T: ?Sized, '_> Eq for Is<'_, T> where
    T: ToOwned + Eq
[src]

impl<T: ?Sized, '_> Hash for Is<'_, T> where
    T: ToOwned + Hash
[src]

impl<T: ?Sized, '_> LowerExp for Is<'_, T> where
    T: ToOwned + LowerExp
[src]

impl<T: ?Sized, '_> LowerHex for Is<'_, T> where
    T: ToOwned + LowerHex
[src]

impl<T: ?Sized, U, O, '_> Mul<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: Mul<Owned<U>, Output = O> + Mul<&'a U::Is, Output = O>,
    &'a T: Mul<Owned<U>, Output = O> + Mul<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the * operator.

impl<T: ?Sized, O, '_> Neg for Is<'_, T> where
    T: ToOwned,
    T::Owned: Neg<Output = O>,
    &'a T: Neg<Output = O>, 
[src]

type Output = O

The resulting type after applying the - operator.

impl<T: ?Sized, O, '_> Not for Is<'_, T> where
    T: ToOwned,
    T::Owned: Not<Output = O>,
    &'a T: Not<Output = O>, 
[src]

type Output = O

The resulting type after applying the ! operator.

impl<T: ?Sized, '_> Octal for Is<'_, T> where
    T: ToOwned + Octal
[src]

impl<T: ?Sized, '_> Ord for Is<'_, T> where
    T: ToOwned + Ord
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialEq<Is<'_, U>> for Is<'_, T> where
    T: ToOwned + PartialEq<U>,
    U: ToOwned
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialEq<Is<'_, U>> for IsCow<'_, T> where
    T: ToOwned + PartialEq<U>,
    U: ToOwned
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialEq<Is<'_, U>> for IsMut<'_, T> where
    T: ToOwned + PartialEq<U>,
    T::Owned: BorrowMut<T>,
    U: ToOwned
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialEq<IsCow<'_, U>> for Is<'_, T> where
    T: ToOwned + PartialEq<U>,
    U: ToOwned
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialEq<IsMut<'_, U>> for Is<'_, T> where
    T: ToOwned + PartialEq<U>,
    U: ToOwned,
    U::Owned: BorrowMut<U>, 
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialOrd<Is<'_, U>> for Is<'_, T> where
    T: ToOwned + PartialOrd<U>,
    U: ToOwned
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialOrd<Is<'_, U>> for IsCow<'_, T> where
    T: ToOwned + PartialOrd<U>,
    U: ToOwned
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialOrd<Is<'_, U>> for IsMut<'_, T> where
    T: ToOwned + PartialOrd<U>,
    T::Owned: BorrowMut<T>,
    U: ToOwned
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialOrd<IsCow<'_, U>> for Is<'_, T> where
    T: ToOwned + PartialOrd<U>,
    U: ToOwned
[src]

impl<T: ?Sized, U: ?Sized, '_, '_> PartialOrd<IsMut<'_, U>> for Is<'_, T> where
    T: ToOwned + PartialOrd<U>,
    U: ToOwned,
    U::Owned: BorrowMut<U>, 
[src]

impl<T: ?Sized, U, O, '_> Rem<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: Rem<Owned<U>, Output = O> + Rem<&'a U::Is, Output = O>,
    &'a T: Rem<Owned<U>, Output = O> + Rem<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the % operator.

impl<T: ?Sized, U, O, '_> Shl<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: Shl<Owned<U>, Output = O> + Shl<&'a U::Is, Output = O>,
    &'a T: Shl<Owned<U>, Output = O> + Shl<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the << operator.

impl<T: ?Sized, U, O, '_> Shr<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: Shr<Owned<U>, Output = O> + Shr<&'a U::Is, Output = O>,
    &'a T: Shr<Owned<U>, Output = O> + Shr<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the >> operator.

impl<T: ?Sized, U, O, '_> Sub<U> for Is<'_, T> where
    T: ToOwned,
    T::Owned: Sub<Owned<U>, Output = O> + Sub<&'a U::Is, Output = O>,
    &'a T: Sub<Owned<U>, Output = O> + Sub<&'b U::Is, Output = O>,
    U: AsIs
[src]

type Output = O

The resulting type after applying the - operator.

impl<T: ?Sized, '_> UpperExp for Is<'_, T> where
    T: ToOwned + UpperExp
[src]

impl<T: ?Sized, '_> UpperHex for Is<'_, T> where
    T: ToOwned + UpperHex
[src]

Auto Trait Implementations

impl<'a, T: ?Sized> RefUnwindSafe for Is<'a, T> where
    T: RefUnwindSafe,
    <T as ToOwned>::Owned: RefUnwindSafe

impl<'a, T: ?Sized> Send for Is<'a, T> where
    T: Send + Sync,
    <T as ToOwned>::Owned: Send

impl<'a, T: ?Sized> Sync for Is<'a, T> where
    T: Sync,
    <T as ToOwned>::Owned: Sync

impl<'a, T: ?Sized> Unpin for Is<'a, T> where
    <T as ToOwned>::Owned: Unpin

impl<'a, T> !UnwindSafe for Is<'a, T>

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> ToString for T where
    T: Display + ?Sized
[src]

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.