Trait ExpectInternal
pub trait ExpectInternal<T> {
// Required method
fn expect_internal(self, msg: &str) -> Result<T, HintedString>;
}Expand description
Adds a method analogous to Option::expect that raises an internal
compiler error instead of panicking.
Required Methods§
fn expect_internal(self, msg: &str) -> Result<T, HintedString>
fn expect_internal(self, msg: &str) -> Result<T, HintedString>
Extracts the value, producing an internal error if self is None.