pub trait ValueType:
Sized
+ Clone
+ PartialEq
+ Debug {
type NegateOutput: ValueType;
const TYPE: Type;
Show 16 methods
// Provided methods
fn equals(_a: Self, _b: Self) -> Result<bool, OperatorError> { ... }
fn less_than(_a: Self, _b: Self) -> Result<bool, OperatorError> { ... }
fn less_than_or_equal(a: Self, b: Self) -> Result<bool, OperatorError> { ... }
fn not_equals(a: Self, b: Self) -> Result<bool, OperatorError> { ... }
fn bitwise_or(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn bitwise_xor(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn bitwise_and(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn shift_left(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn shift_right(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn add(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn subtract(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn multiply(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn divide(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn modulo(_a: Self, _b: Self) -> Result<Self, OperatorError> { ... }
fn not(_a: Self) -> Result<Self, OperatorError> { ... }
fn negate(_a: Self) -> Result<Self::NegateOutput, OperatorError> { ... }
}Expand description
A Rust type that is used as the storage for a Somni type.
Required Associated Constants§
Required Associated Types§
Sourcetype NegateOutput: ValueType
type NegateOutput: ValueType
The type of the result of the unary - operator.
Provided Methods§
Sourcefn equals(_a: Self, _b: Self) -> Result<bool, OperatorError>
fn equals(_a: Self, _b: Self) -> Result<bool, OperatorError>
Implements the == operator.
Sourcefn less_than(_a: Self, _b: Self) -> Result<bool, OperatorError>
fn less_than(_a: Self, _b: Self) -> Result<bool, OperatorError>
Implements the < operator.
Sourcefn less_than_or_equal(a: Self, b: Self) -> Result<bool, OperatorError>
fn less_than_or_equal(a: Self, b: Self) -> Result<bool, OperatorError>
Implements the <= operator.
Sourcefn not_equals(a: Self, b: Self) -> Result<bool, OperatorError>
fn not_equals(a: Self, b: Self) -> Result<bool, OperatorError>
Implements the != operator.
Sourcefn bitwise_or(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn bitwise_or(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the | operator.
Sourcefn bitwise_xor(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn bitwise_xor(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the ^ operator.
Sourcefn bitwise_and(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn bitwise_and(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the & operator.
Sourcefn shift_left(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn shift_left(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the << operator.
Sourcefn shift_right(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn shift_right(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the >> operator.
Sourcefn add(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn add(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the + operator.
Sourcefn subtract(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn subtract(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the binary - operator.
Sourcefn multiply(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn multiply(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the binary * operator.
Sourcefn divide(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn divide(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the binary / operator.
Sourcefn modulo(_a: Self, _b: Self) -> Result<Self, OperatorError>
fn modulo(_a: Self, _b: Self) -> Result<Self, OperatorError>
Implements the binary % operator.
Sourcefn not(_a: Self) -> Result<Self, OperatorError>
fn not(_a: Self) -> Result<Self, OperatorError>
Implements the unary ! operator.
Sourcefn negate(_a: Self) -> Result<Self::NegateOutput, OperatorError>
fn negate(_a: Self) -> Result<Self::NegateOutput, OperatorError>
Implements the unary - operator.
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.