rstmt_traits/classify.rs
1/*
2 Appellation: classify <module>
3 Created At: 2025.12.20:06:14:19
4 Contrib: @FL03
5*/
6/// [`Classify`] defines an interface for objects capable of being classified as other types.
7pub trait Classify {
8 type Output;
9
10 fn classify(&self) -> Self::Output;
11}
12/// [`ClassifyBy`] is a trait defining the ability for an object to be classified _by_ or _with_
13/// another object.
14pub trait ClassifyBy<Rhs> {
15 type Output;
16
17 fn classify_by(&self, rhs: Rhs) -> Self::Output;
18}