pub use crate::config::{matchable::Matchable, parameter_matchable::ParameterMatchable}; pub trait IntoString { fn into_string(self) -> String; } pub trait MapAny { fn map_any T>(self, op: F) -> Self; } impl MapAny for Result { fn map_any T>(self, op: F) -> Self { match self { Ok(x) => Ok(op(x)), Err(x) => Err(op(x)), } } } pub trait MaybeRef { fn maybe_ref(&self) -> Option<&T>; fn to_ref(&self) -> &T; } pub trait MaybeRefAs { fn maybe_ref_as(&self) -> Option<&T> where Self: MaybeRef; fn to_ref_as(&self) -> &T where Self: MaybeRef; }