#[non_exhaustive]pub struct Config {
pub base_url: String,
pub private_key: String,
pub dashboard_user: Option<DashboardUser>,
pub dashboard_hmac_key: Option<String>,
}Expand description
Client configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.base_url: StringBase URL of the appserv provider API, e.g. https://appserv.example.com.
private_key: StringBase64-encoded ED25519 private key (32-byte seed or 64-byte seed+public key).
dashboard_user: Option<DashboardUser>Optional dashboard operator context, signed into each request.
dashboard_hmac_key: Option<String>Dedicated HMAC secret for the X-MountOS-Dashboard-User header (appserv
DASHBOARD_USER_HMAC_KEY); required when dashboard_user is set.
Implementations§
Source§impl Config
impl Config
Sourcepub fn new(base_url: impl Into<String>, private_key: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>, private_key: impl Into<String>) -> Self
Builds the value from its required fields. Optional fields start unset.
Sourcepub fn with_dashboard_user(self, value: DashboardUser) -> Self
pub fn with_dashboard_user(self, value: DashboardUser) -> Self
Sets dashboard_user.
Sourcepub fn with_dashboard_hmac_key(self, value: impl Into<String>) -> Self
pub fn with_dashboard_hmac_key(self, value: impl Into<String>) -> Self
Sets dashboard_hmac_key.
Trait Implementations§
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