use std::borrow::Cow;
#[derive(Debug, Clone, thiserror::Error)]
pub enum RegistrationError {
#[error("Method already registered: {0}")]
MethodAlreadyRegistered(Cow<'static, str>),
}
impl RegistrationError {
pub fn method_already_registered(name: impl Into<Cow<'static, str>>) -> Self {
Self::MethodAlreadyRegistered(name.into())
}
}