pub const trait Unwrap<O> {
#[track_caller]
fn unwrap(self) -> O;
fn unwrap_or(self, default: O) -> O;
unsafe fn unwrap_unchecked(self) -> O;
}
pub const trait UnwrapDefault<O> {
fn unwrap_or_default(self) -> O;
}
impl<O: [const] core::marker::Destruct> const Unwrap<O> for Option<O> {
#[inline(always)]
fn unwrap(self) -> O {
Self::unwrap(self)
}
#[inline(always)]
fn unwrap_or(self, default: O) -> O {
Self::unwrap_or(self, default)
}
#[inline(always)]
unsafe fn unwrap_unchecked(self) -> O {
Self::unwrap_unchecked(self)
}
}
impl<O: [const] core::default::Default> const UnwrapDefault<O> for Option<O> {
#[inline(always)]
fn unwrap_or_default(self) -> O {
Self::unwrap_or_default(self)
}
}