pub struct PwrConfig {
pub version: u32,
pub server_host: String,
pub server_port: u16,
pub server_psk: String,
pub use_tls: bool,
pub server_fingerprint: Option<String>,
pub local_root: String,
pub connect_timeout_secs: u64,
pub transfer_timeout_secs: u64,
}Expand description
Client configuration stored at ~/.config/pwr/config.toml.
Contains the connection details for reaching the pwr-server daemon and the local directory root where projects are stored.
Fields§
§version: u32Schema version for forward compatibility.
server_host: StringHostname or IP address of the NAS running pwr-server.
server_port: u16Port the server listens on (default: 9742).
server_psk: StringHex-encoded 256-bit pre-shared key for authentication.
use_tls: boolWhether to use TLS when connecting to the server. Should match the server configuration (the server always uses TLS).
server_fingerprint: Option<String>SHA-256 fingerprint of the server’s TLS certificate (hex). Used for certificate pinning.
local_root: StringLocal root directory where projects live, e.g. “/home/jacob/Projects”.
connect_timeout_secs: u64Connection timeout in seconds.
transfer_timeout_secs: u64Transfer timeout in seconds.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PwrConfig
impl<'de> Deserialize<'de> for PwrConfig
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 PwrConfig
impl RefUnwindSafe for PwrConfig
impl Send for PwrConfig
impl Sync for PwrConfig
impl Unpin for PwrConfig
impl UnsafeUnpin for PwrConfig
impl UnwindSafe for PwrConfig
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