pub struct Settings {
pub local_repository: Option<PathBuf>,
pub interactive_mode: Option<bool>,
pub offline: Option<bool>,
pub servers: Servers,
pub mirrors: Mirrors,
}
Fields§
§local_repository: Option<PathBuf>
§interactive_mode: Option<bool>
§offline: Option<bool>
§servers: Servers
§mirrors: Mirrors
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn read_local_config() -> Result<Settings, Error>
pub fn read_local_config() -> Result<Settings, Error>
Attempts to read the local configuration file.
Sourcepub fn get_local_repository_or_default(&self) -> Option<PathBuf>
pub fn get_local_repository_or_default(&self) -> Option<PathBuf>
Returns the local repository or the default repository.
If None is Returned Home Directory is not found.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
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 Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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