pub struct SiConfig {
pub login: String,
pub auth_url: String,
pub api_url: String,
}Expand description
SiServer connection settings; auth and API live on separate hosts.
Fields§
§login: StringCorporate username for LDAP authentication.
auth_url: StringLDAP authentication endpoint.
api_url: StringBase URL for reports and calendar data.
Implementations§
Source§impl SiConfig
impl SiConfig
Sourcepub fn module() -> ConfigModule
pub fn module() -> ConfigModule
Module metadata for the setup wizard.
Sourcepub fn init(config: &Option<SiConfig>) -> Result<Self>
pub fn init(config: &Option<SiConfig>) -> Result<Self>
Interactive setup; existing values become the prompt defaults.
let existing_config = Some(SiConfig {
login: "olduser".to_string(),
auth_url: "https://old-auth.com".to_string(),
api_url: "https://old-api.com".to_string(),
});
let new_config = SiConfig::init(&existing_config)?;Trait Implementations§
Source§impl<'de> Deserialize<'de> for SiConfig
impl<'de> Deserialize<'de> for SiConfig
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 SiConfig
impl RefUnwindSafe for SiConfig
impl Send for SiConfig
impl Sync for SiConfig
impl Unpin for SiConfig
impl UnsafeUnpin for SiConfig
impl UnwindSafe for SiConfig
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