1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
/*
Appellation: ops <module>
Contrib: FL03 <jo3mccain@icloud.com>
*/
//! # Operations
//!
//!
pub use self::{kinds::*, operator::*};
pub(crate) mod kinds;
pub(crate) mod operator;
pub mod binary;
pub mod unary;
pub trait ApplyTo<T> {
type Output;
fn apply_to(&self, other: T) -> Self::Output;
}
pub trait IntoOp {
fn into_op(self) -> Op;
}
impl<S> IntoOp for S
where
S: Into<Op>,
{
fn into_op(self) -> Op {
self.into()
}
}
pub(crate) mod prelude {
pub use super::{ApplyTo, IntoOp};
pub use super::binary::*;
pub use super::kinds::Op;
pub use super::unary::*;
}