Enum nu_protocol::MaybeOwned [−][src]
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
Borrowed(&'a T)
Implementations
impl<T> MaybeOwned<'_, T>
[src]
impl<T> MaybeOwned<'_, T>
[src]Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for MaybeOwned<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for MaybeOwned<'a, T> where
T: Send + Sync,
T: Send + Sync,
impl<'a, T> Sync for MaybeOwned<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for MaybeOwned<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> UnwindSafe for MaybeOwned<'a, T> where
T: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> SpannedItem for T
[src]
impl<T> SpannedItem for T
[src]impl<T> TaggedItem for T
[src]
impl<T> TaggedItem for T
[src]