pub trait TakeIf {
type Inner;
// Required method
fn take_if<F: FnOnce(&Self::Inner) -> bool>(
&mut self,
predicate: F,
) -> Option<Self::Inner>;
}
Expand description
Extension trait for Option<T>
that adds the take_if
method.
See the crate-level documentation for more information.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.