Remove unused KeyMode type

This commit is contained in:
Jon Häggblad
2024-04-04 22:05:57 +02:00
parent c7dbcc097d
commit 03c702d498
2 changed files with 1 additions and 19 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ mod socks5_client;
mod traits;
pub use client::{DisconnectedMixnetClient, IncludedSurbs, MixnetClientBuilder};
pub use config::{Config, KeyMode};
pub use config::Config;
pub use native_client::MixnetClient;
pub use native_client::MixnetClientSender;
pub use nym_client_core::{
-18
View File
@@ -5,30 +5,12 @@ use url::Url;
const DEFAULT_SDK_CLIENT_ID: &str = "_default-nym-sdk-client";
#[derive(Clone, Debug, Default)]
pub enum KeyMode {
/// Use existing key files if they exists, otherwise create new ones.
#[default]
Keep,
/// Create new keys, overwriting any potential previously existing keys.
Overwrite,
}
impl KeyMode {
pub(crate) fn is_keep(&self) -> bool {
matches!(self, KeyMode::Keep)
}
}
/// Config struct for [`crate::mixnet::MixnetClient`]
#[derive(Default)]
pub struct Config {
/// If the user has explicitly specified a gateway.
pub user_chosen_gateway: Option<String>,
/// Determines how to handle existing key files found.
pub key_mode: KeyMode,
/// The details of the network we're using. It defaults to the mainnet network.
pub network_details: NymNetworkDetails,