Trait owner_monad::OwnerOnce [−][src]
A monad which conditionally provides access to a T
value.
This is included alongside Owner
and OwnerMut
for completeness, but
this trait is isomorphic to FnOnce() -> T
.
Required methods
fn with<U>(self, f: impl FnOnce(T) -> U) -> Option<U>
[src]
Consumes the monad, applying the given function to the contained value, if it exists.