Skip to main content

InsRes

Type Alias InsRes 

Source
pub type InsRes<'a, T> = (&'a mut T, Option<T>);
Expand description

Insert result type.

Trait Implementations§

Source§

impl<'a, T> InsResAide<T> for InsRes<'a, T>

Source§

fn previous(&self) -> bool

Returns true if InsRes holds previous record.

Source§

fn uproot_previous(&mut self) -> T

Returns T of InsRes Some(T) leaving None in its place.

Panics if None.

Source§

impl<'a, T> InsResAideEx<T> for InsRes<'a, T>

Source§

unsafe fn uproot_previous_unchecked(&mut self) -> T

Returns T of InsRes Some(T) leaving None in its place.

Produces undefined behavior if None.

Check with std::hint::unreachable_unchecked for more information.