pub enum AddRes {
Ok(Option<usize>),
ZeroLen,
}
Expand description
Addition result enumeration.
Variants§
Ok(Option<usize>)
Addition accomplished. Optionally carries previous value, based on its existence.
ZeroLen
Attempt to add zero occurrent.
Implementations§
Source§impl AddRes
impl AddRes
Sourcepub const fn is_ok_some(&self) -> bool
pub const fn is_ok_some(&self) -> bool
Returns true
only for AddRes::Ok(Some(_))
.
Sourcepub const fn uproot_ok_some(&self) -> usize
pub const fn uproot_ok_some(&self) -> usize
Returns usize
of AddRes::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 AddRes::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 AddRes
impl StructuralPartialEq for AddRes
Auto Trait Implementations§
impl Freeze for AddRes
impl RefUnwindSafe for AddRes
impl Send for AddRes
impl Sync for AddRes
impl Unpin for AddRes
impl UnwindSafe for AddRes
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