pub struct Config {
pub version: Version,
pub api: Url,
pub key: VerifyingKey,
pub check_on_startup: bool,
pub check_interval: Option<Duration>,
}
Expand description
The configuration options for the client.
Fields§
§version: Version
The current version of the application. This is reported to the server when making requests such as checking for updates.
api: Url
The URL of the API. This is used to make requests to the server, such as
checking for updates. It needs to be an FQDN (Fully-Qualified Domain
Name), and should include the protocol (e.g. https://
), plus any base
path (e.g. /api
). For example, https://api.example.com/api/v2
.
key: VerifyingKey
The public key for the server. This is used to verify the HTTP responses from the server, to ensure that they have not been tampered with. The format used is Ed25519, which is a modern and secure algorithm.
check_on_startup: bool
Whether to check for updates on startup.
check_interval: Option<Duration>
How often to check for updates. This is optional.
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 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