pub struct PanexConfig {
pub favorites: FavoritesConfig,
pub open: OpenConfig,
}Fields§
§favorites: FavoritesConfig§open: OpenConfigImplementations§
Source§impl PanexConfig
impl PanexConfig
Sourcepub fn config_path() -> Result<PathBuf, String>
pub fn config_path() -> Result<PathBuf, String>
Returns ~/.panex/config.toml
pub fn is_favorite(&self, path: &str) -> bool
pub fn add_favorite(&mut self, path: &str) -> Result<(), String>
pub fn remove_favorite(&mut self, path: &str) -> Result<(), String>
pub fn toggle_favorite(&mut self, path: &str) -> Result<bool, String>
Sourcepub fn get_gui_app(&self, ext: &str) -> Option<&String>
pub fn get_gui_app(&self, ext: &str) -> Option<&String>
Get the custom app for a file extension in GUI mode.
Sourcepub fn get_tui_app(&self, ext: &str) -> Option<&String>
pub fn get_tui_app(&self, ext: &str) -> Option<&String>
Get the custom command for a file extension in TUI mode.
Trait Implementations§
Source§impl Clone for PanexConfig
impl Clone for PanexConfig
Source§fn clone(&self) -> PanexConfig
fn clone(&self) -> PanexConfig
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 PanexConfig
impl Debug for PanexConfig
Source§impl Default for PanexConfig
impl Default for PanexConfig
Source§fn default() -> PanexConfig
fn default() -> PanexConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PanexConfig
impl<'de> Deserialize<'de> for PanexConfig
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 PanexConfig
impl RefUnwindSafe for PanexConfig
impl Send for PanexConfig
impl Sync for PanexConfig
impl Unpin for PanexConfig
impl UnsafeUnpin for PanexConfig
impl UnwindSafe for PanexConfig
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