pub struct Config {Show 15 fields
pub email: Option<String>,
pub sso_id: Option<String>,
pub base_url: Option<String>,
pub identity_url: Option<String>,
pub ui_url: Option<String>,
pub notifications_url: Option<String>,
pub lock_timeout: u64,
pub sync_interval: u64,
pub pinentry: String,
pub client_cert_path: Option<PathBuf>,
pub ssh_confirm_sign: bool,
pub macos_unlock_dialog: bool,
pub logging: bool,
pub touchid_gate: Gate,
pub device_id: Option<String>,
}Fields§
§email: Option<String>§sso_id: Option<String>§base_url: Option<String>§identity_url: Option<String>§ui_url: Option<String>§notifications_url: Option<String>§lock_timeout: u64§sync_interval: u64§pinentry: String§client_cert_path: Option<PathBuf>§ssh_confirm_sign: bool§macos_unlock_dialog: boolOn macOS, controls how the master-password prompt is shown at unlock
time. Default true renders a native modal (works from daemonized
contexts — ssh-sign, Finder-launched GUI git, etc.). Set false to
fall back to pinentry. No effect on other platforms.
logging: bool§touchid_gate: Gate§device_id: Option<String>Implementations§
Source§impl Config
impl Config
pub fn new() -> Self
pub fn load() -> Result<Self>
pub async fn load_async() -> Result<Self>
pub fn save(&self) -> Result<()>
Sourcepub fn load_cached() -> Result<Arc<Self>>
pub fn load_cached() -> Result<Arc<Self>>
Load once per process and reuse on subsequent calls. Safe for the
short-lived bwx CLI where the config file isn’t mutated mid-run.
Mutating commands (bwx config set/unset) must keep using
load() so they see fresh state.
pub fn validate() -> Result<()>
pub fn base_url(&self) -> String
pub fn identity_url(&self) -> String
pub fn ui_url(&self) -> String
pub fn notifications_url(&self) -> String
pub fn client_cert_path(&self) -> Option<&Path>
pub fn server_name(&self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more