Enum avr_oxide::util::OwnOrBorrow
source · pub enum OwnOrBorrow<'a, T: 'a + ?Sized> {
Own(Box<T>),
Borrow(&'a T),
}
Variants§
Implementations§
source§impl<T> OwnOrBorrow<'_, T>
impl<T> OwnOrBorrow<'_, T>
pub fn into_owned(self) -> T
Trait Implementations§
source§impl<T> Clone for OwnOrBorrow<'_, T>where
T: Clone,
impl<T> Clone for OwnOrBorrow<'_, T>where
T: Clone,
source§impl<T> Deref for OwnOrBorrow<'_, T>where
T: ?Sized,
impl<T> Deref for OwnOrBorrow<'_, T>where
T: ?Sized,
source§impl<T> From<T> for OwnOrBorrow<'_, T>
impl<T> From<T> for OwnOrBorrow<'_, T>
source§impl Into<OwnOrBorrow<'static, dyn Pin>> for Debouncer
impl Into<OwnOrBorrow<'static, dyn Pin>> for Debouncer
source§fn into(self) -> OwnOrBorrow<'static, dyn Pin>
fn into(self) -> OwnOrBorrow<'static, dyn Pin>
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl<'a, T> Freeze for OwnOrBorrow<'a, T>where
T: ?Sized,
impl<'a, T> RefUnwindSafe for OwnOrBorrow<'a, T>where
T: RefUnwindSafe + ?Sized,
impl<'a, T> Send for OwnOrBorrow<'a, T>
impl<'a, T> Sync for OwnOrBorrow<'a, T>
impl<'a, T> Unpin for OwnOrBorrow<'a, T>where
T: ?Sized,
impl<'a, T> UnwindSafe for OwnOrBorrow<'a, T>
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