#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub enum CancellationResult<T> {
Item(T),
Continue,
Break,
}
impl<T> CancellationResult<T> {
pub fn item(t: impl Into<T>) -> Self {
Self::Item(t.into())
}
}
impl<T> From<T> for CancellationResult<T> {
fn from(value: T) -> Self {
Self::Item(value)
}
}