[−][src]Trait mod_utilities::AllowIf
A trait that allows discarding Option values if some condition is or is not met
Associated Types
type Accepted
The type of value given by AllowIf calls
Required methods
fn allow_if<F: FnOnce(&Self::Accepted) -> bool>(
self,
f: F
) -> Option<Self::Accepted>
self,
f: F
) -> Option<Self::Accepted>
Discard Option value if some condition is not met
fn allow_if_mut<F: FnOnce(&mut Self::Accepted) -> bool>(
self,
f: F
) -> Option<Self::Accepted>
self,
f: F
) -> Option<Self::Accepted>
Discard Option value if some condition is not met
Provided methods
fn allow_if_not<F: FnOnce(&Self::Accepted) -> bool>(
self,
f: F
) -> Option<Self::Accepted>
self,
f: F
) -> Option<Self::Accepted>
Discard Option value if some condition is met
fn allow_if_not_mut<F: FnOnce(&mut Self::Accepted) -> bool>(
self,
f: F
) -> Option<Self::Accepted>
self,
f: F
) -> Option<Self::Accepted>
Discard Option value if some condition is met