pub struct PathsConfig {
pub session_dir: Option<PathBuf>,
pub cache_dir: Option<PathBuf>,
pub history_file: Option<PathBuf>,
}Expand description
Path configuration.
Fields§
§session_dir: Option<PathBuf>Session storage directory.
cache_dir: Option<PathBuf>Cache directory.
history_file: Option<PathBuf>Shell history file path.
Set by --sandbox to redirect history to sandbox dir.
When None, defaults to ~/.orcs/history.
Implementations§
Source§impl PathsConfig
impl PathsConfig
Sourcepub fn session_dir_or_default(&self) -> PathBuf
pub fn session_dir_or_default(&self) -> PathBuf
Returns the session directory, falling back to default.
Sourcepub fn history_file_or_default(&self) -> PathBuf
pub fn history_file_or_default(&self) -> PathBuf
Returns the history file path, falling back to ~/.orcs/history.
Trait Implementations§
Source§impl Clone for PathsConfig
impl Clone for PathsConfig
Source§fn clone(&self) -> PathsConfig
fn clone(&self) -> PathsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathsConfig
impl Debug for PathsConfig
Source§impl Default for PathsConfig
impl Default for PathsConfig
Source§fn default() -> PathsConfig
fn default() -> PathsConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PathsConfigwhere
PathsConfig: Default,
impl<'de> Deserialize<'de> for PathsConfigwhere
PathsConfig: Default,
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
Source§impl PartialEq for PathsConfig
impl PartialEq for PathsConfig
Source§impl Serialize for PathsConfig
impl Serialize for PathsConfig
impl StructuralPartialEq for PathsConfig
Auto Trait Implementations§
impl Freeze for PathsConfig
impl RefUnwindSafe for PathsConfig
impl Send for PathsConfig
impl Sync for PathsConfig
impl Unpin for PathsConfig
impl UnsafeUnpin for PathsConfig
impl UnwindSafe for PathsConfig
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