use zeroize::Zeroize;
#[derive(Clone, Debug, Eq, PartialEq, Zeroize)]
pub struct ApiKey(String);
impl ApiKey {
pub const fn new() -> Self {
Self(String::new())
}
pub fn as_str(&self) -> &str {
self.0.as_str()
}
}
impl Default for ApiKey {
fn default() -> Self {
Self::new()
}
}
impl From<&str> for ApiKey {
fn from(val: &str) -> Self {
Self(val.into())
}
}
impl From<String> for ApiKey {
fn from(val: String) -> Self {
Self(val)
}
}