#![forbid(unsafe_code)]
#![deny(missing_docs)]
use anyhow::Result;
use std::str::FromStr;
#[derive(Debug, Eq, PartialEq)]
pub enum ClientMode {
#[cfg(feature = "cloudwatch")]
CloudWatch,
#[cfg(feature = "s3")]
S3,
}
impl FromStr for ClientMode {
type Err = &'static str;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
#[cfg(feature = "cloudwatch")]
"cloudwatch" => Ok(Self::CloudWatch),
#[cfg(feature = "s3")]
"s3" => Ok(Self::S3),
_ => Err("no match"),
}
}
}