pub struct AppConfig {
pub alias: String,
pub listen_port: u16,
pub quic_port: u16,
pub download_dir: String,
pub auto_accept_known: bool,
pub auto_accept_unknown: bool,
pub discovery: Vec<String>,
pub max_concurrent_files: usize,
pub trust: TrustConfig,
}Fields§
§alias: String§listen_port: u16§quic_port: u16§download_dir: String§auto_accept_known: bool§auto_accept_unknown: bool§discovery: Vec<String>§max_concurrent_files: usize§trust: TrustConfigImplementations§
Source§impl AppConfig
impl AppConfig
pub fn load_or_default() -> Result<Self>
pub fn load_or_default_from(path: impl AsRef<Path>) -> Result<Self>
pub fn save_default_path(&self) -> Result<()>
pub fn save_to_path(&self, path: impl AsRef<Path>) -> Result<()>
pub fn to_toml_string(&self) -> Result<String>
pub fn redacted(&self) -> Self
pub fn to_redacted_toml_string(&self) -> Result<String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
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
impl Eq for AppConfig
impl StructuralPartialEq for AppConfig
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
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