rspace_traits/ops/
transform.rs

1/*
2    Appellation: transform <module>
3    Created At: 2025.12.24:14:22:11
4    Contrib: @FL03
5*/
6
7/// The [`Transform`] trait establishes a common interface for objects that can be transformed
8/// with respect to a given transformation, input, etc. to produce a new output.
9pub trait Transform<Rhs> {
10    type Output;
11
12    fn transform(&self, rhs: Rhs) -> Self::Output;
13}
14
15pub trait TryTransform<Rhs> {
16    type Output;
17    type Error;
18
19    fn try_transform(&self, rhs: Rhs) -> Result<Self::Output, Self::Error>;
20}