pub trait HasUnaryOp<D>: Clone + Copy {
// Required method
fn unary_op_fn(
self,
mode: Option<UnaryArgMode>,
) -> impl Fn(Opt<D>) -> Opt<D>;
}Expand description
Trait for ops that provide unary operation function.
Required Methods§
Sourcefn unary_op_fn(self, mode: Option<UnaryArgMode>) -> impl Fn(Opt<D>) -> Opt<D>
fn unary_op_fn(self, mode: Option<UnaryArgMode>) -> impl Fn(Opt<D>) -> Opt<D>
Returns a function that applies this unary operation with the given mode. If mode is None, uses the default mode (Mode0).
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.