Operation

Trait Operation 

Source
pub trait Operation:
    Clone
    + Debug
    + Hash
    + PartialEq
    + Eq {
    // Required methods
    fn is_commutative(&self) -> bool;
    fn is_binary(&self) -> bool;
    fn is_unary(&self) -> bool;
    fn is_unordered(&self) -> bool;
    fn is_ordered(&self) -> bool;
}
Expand description

A supertrait that concisely contains all the traits needed to serve as an operation for NodeInfo.

Also provides functions that describe properties of an operation.

Required Methods§

Source

fn is_commutative(&self) -> bool

Whether or not this operation commutes.

Source

fn is_binary(&self) -> bool

Whether or not this operation has 2 operands.

Source

fn is_unary(&self) -> bool

Whether or not this operation has 1 operand.

Source

fn is_unordered(&self) -> bool

Whether or not this operation accepts an arbitrary number of unordered operands.

Source

fn is_ordered(&self) -> bool

Whether or not this operation accepts an arbitrary number of ordered operands.

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.

Implementors§