Enum nu_protocol::MaybeOwned
source · [−]pub enum MaybeOwned<'a, T> {
Owned(T),
Borrowed(&'a T),
}
Expand description
Helper type to allow passing something that may potentially be owned, but could also be borrowed
Variants
Owned(T)
Borrowed(&'a T)
Implementations
sourceimpl<T> MaybeOwned<'_, T>
impl<T> MaybeOwned<'_, T>
Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for MaybeOwned<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for MaybeOwned<'a, T> where
T: Send + Sync,
impl<'a, T> Sync for MaybeOwned<'a, T> where
T: Sync,
impl<'a, T> Unpin for MaybeOwned<'a, T> where
T: Unpin,
impl<'a, T> UnwindSafe for MaybeOwned<'a, T> where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more