pub enum RefOwn<'b, T: ?Sized, U> {
Ref(&'b T),
Str(&'b str),
Own(U),
}Expand description
A borrowed or owned value of various types.
This exists purely as a workaround for Rust not having GATs yet.
Variants§
Trait Implementations§
impl<'b, T: ?Sized, U: Copy> Copy for RefOwn<'b, T, U>
Auto Trait Implementations§
impl<'b, T, U> Freeze for RefOwn<'b, T, U>
impl<'b, T, U> RefUnwindSafe for RefOwn<'b, T, U>
impl<'b, T, U> Send for RefOwn<'b, T, U>
impl<'b, T, U> Sync for RefOwn<'b, T, U>
impl<'b, T, U> Unpin for RefOwn<'b, T, U>
impl<'b, T, U> UnwindSafe for RefOwn<'b, T, U>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more