use std::sync::Arc;
#[allow(deprecated)]
use crate::{prelude::Identity, DittoConfig};
#[allow(deprecated)]
pub(crate) enum ConfigOrIdentity {
Config(DittoConfig),
Identity(Arc<dyn Identity>),
}
#[allow(deprecated)]
impl ConfigOrIdentity {
pub(crate) fn requires_offline_only_license_token(&self) -> bool {
match self {
ConfigOrIdentity::Config(config) => {
matches!(
&config.connect,
crate::DittoConfigConnect::SmallPeersOnly { .. }
)
}
ConfigOrIdentity::Identity(identity) => identity.requires_offline_only_license_token(),
}
}
}