pub enum InsRes {
Ok(Option<usize>),
ZeroLen,
}
Expand description
Insertion result enumeration.
Variants§
Ok(Option<usize>)
Insertion accomplished. Optionally carries previous value, based on its existence.
ZeroLen
Attempt to insert zero occurrent.
Implementations§
Source§impl InsRes
impl InsRes
Sourcepub const fn is_ok_some(&self) -> bool
pub const fn is_ok_some(&self) -> bool
Returns true
only for InsRes::Ok(Some(_))
.
Sourcepub const fn uproot_ok_some(&self) -> usize
pub const fn uproot_ok_some(&self) -> usize
Returns usize
of InsRes::Ok(Some(usize))
or panics if:
- not that variant
Option<usize>
isNone
Sourcepub const unsafe fn uproot_ok_some_unchecked(&self) -> usize
pub const unsafe fn uproot_ok_some_unchecked(&self) -> usize
Returns usize
of InsRes::Ok(Some(usize))
and does not panic (UB) if:
- not that variant
Option<usize>
isNone
Check with std::hint::unreachable_unchecked
for more information.
Trait Implementations§
impl Eq for InsRes
impl StructuralPartialEq for InsRes
Auto Trait Implementations§
impl Freeze for InsRes
impl RefUnwindSafe for InsRes
impl Send for InsRes
impl Sync for InsRes
impl Unpin for InsRes
impl UnwindSafe for InsRes
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