rstmt_traits/ops/
transform.rs

1/*
2    Appellation: transform <module>
3    Created At: 2025.12.24:14:22:11
4    Contrib: @FL03
5*/
6
7/// [`Dirac`] is used to define a specific transformation operation
8pub trait Dirac<Rhs> {
9    type Output;
10
11    fn apply(self, rhs: Rhs) -> Self::Output;
12}
13/// The [`Transform`] trait establishes a binary operation that for objects capable of being
14/// transformed by another object of type `Rhs`, producing some output.
15///
16pub trait Transform<Rhs> {
17    type Output;
18
19    fn transform(self, rhs: Rhs) -> Self::Output;
20}