MCPcopy Create free account
hub / github.com/bwt-dev/bwt / OptionExt

Interface OptionExt

src/error.rs:72–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70// implemented for failure), but the or_err() name better expresses the intention so its kept around.
71
72pub trait OptionExt<T> {
73 fn or_err<D>(self, context: D) -> Result<T>
74 where
75 D: Display + Send + Sync + 'static;
76
77 fn required(self) -> Result<T>;
78}
79
80impl<T> OptionExt<T> for Option<T> {
81 fn or_err<D>(self, context: D) -> Result<T>

Callers

nothing calls this directly

Implementers 1

error.rssrc/error.rs

Calls

no outgoing calls

Tested by

no test coverage detected