pub struct Takeable<T>(/* private fields */);
Implementations§
Source§impl<T> Takeable<T>
impl<T> Takeable<T>
pub fn new(value: T) -> Takeable<T>
pub fn new_empty() -> Takeable<T>
pub fn take(takeable: &mut Takeable<T>) -> T
pub fn try_take(takeable: &mut Takeable<T>) -> Option<T>
pub fn new_take(takeable: &mut Takeable<T>) -> Takeable<T>
pub fn insert(takeable: &mut Takeable<T>, new_takeable: T) -> Option<T>
pub fn to_opt(takeable: Takeable<T>) -> Option<T>
Trait Implementations§
Source§impl<T: Ord> Ord for Takeable<T>
impl<T: Ord> Ord for Takeable<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for Takeable<T>
impl<T: PartialOrd> PartialOrd for Takeable<T>
impl<T: Copy> Copy for Takeable<T>
impl<T: Eq> Eq for Takeable<T>
impl<T> StructuralPartialEq for Takeable<T>
Auto Trait Implementations§
impl<T> Freeze for Takeable<T>where
T: Freeze,
impl<T> RefUnwindSafe for Takeable<T>where
T: RefUnwindSafe,
impl<T> Send for Takeable<T>where
T: Send,
impl<T> Sync for Takeable<T>where
T: Sync,
impl<T> Unpin for Takeable<T>where
T: Unpin,
impl<T> UnwindSafe for Takeable<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)