Trait opendp::error::ExplainUnwrap [−][src]
pub trait ExplainUnwrap {
type Inner;
fn unwrap_assert(self, explanation: &'static str) -> Self::Inner;
fn unwrap_test(self) -> Self::Inner;
}
Expand description
A trait for calling unwrap with an explanation. Makes calls to unwrap() discoverable.
Associated Types
Required methods
fn unwrap_assert(self, explanation: &'static str) -> Self::Inner
fn unwrap_assert(self, explanation: &'static str) -> Self::Inner
use if the None or Err variant is structurally unreachable
fn unwrap_test(self) -> Self::Inner
fn unwrap_test(self) -> Self::Inner
use in tests, where panics are acceptable