Enum datafu::RefOwn [−][src]
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.
Owned U.
Trait Implementations
impl<'b, T: ?Sized, U: Clone> Clone for RefOwn<'b, T, U>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: PartialEq<T> + PartialEq<U> + PartialEq<str>,
U: PartialEq<T> + PartialEq<U> + PartialEq<str>,
str: PartialEq<T> + PartialEq<U> + PartialEq<str>,
Auto Trait Implementations
impl<'b, T: ?Sized, U> RefUnwindSafe for RefOwn<'b, T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<'b, T: ?Sized, U> Send for RefOwn<'b, T, U> where
T: Sync,
U: Send,
T: Sync,
U: Send,
impl<'b, T: ?Sized, U> Sync for RefOwn<'b, T, U> where
T: Sync,
U: Sync,
T: Sync,
U: Sync,
impl<'b, T: ?Sized, U> Unpin for RefOwn<'b, T, U> where
U: Unpin,
U: Unpin,
impl<'b, T: ?Sized, U> UnwindSafe for RefOwn<'b, T, U> where
T: RefUnwindSafe,
U: UnwindSafe,
T: RefUnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,