use super::{AccountOp, AuthTarget, LogsOp, ProviderOp, TokenOp};
impl TokenOp {
#[must_use]
pub const fn target(&self) -> &AuthTarget {
match self {
Self::Issue { target, .. }
| Self::Rotate { target, .. }
| Self::List { target, .. }
| Self::Revoke { target, .. }
| Self::Expire { target, .. }
| Self::Show { target, .. } => target,
}
}
}
impl AccountOp {
#[must_use]
pub const fn target(&self) -> &AuthTarget {
match self {
Self::List { target, .. } => target,
}
}
}
impl ProviderOp {
#[must_use]
pub const fn target(&self) -> &AuthTarget {
match self {
Self::List { target, .. }
| Self::Add { target, .. }
| Self::Show { target, .. }
| Self::Remove { target, .. }
| Self::Import { target, .. } => target,
}
}
}
impl LogsOp {
#[must_use]
pub const fn target(&self) -> &AuthTarget {
match self {
Self::Summary { target, .. }
| Self::Anomalies { target, .. }
| Self::Show { target, .. } => target,
}
}
}