pub trait LogicalOps {
// Required methods
fn not(&self) -> Result<Self, String>
where Self: Sized;
fn and(&self, other: &Self) -> Result<Self, String>
where Self: Sized;
fn or(&self, other: &Self) -> Result<Self, String>
where Self: Sized;
}
Expand description
Logical operations on values
Required Methods§
Sourcefn not(&self) -> Result<Self, String>where
Self: Sized,
fn not(&self) -> Result<Self, String>where
Self: Sized,
Performs logical NOT on a boolean value.
§Returns
- The negated boolean value
- An error message if the type is incompatible