Struct nu_data::config::NuConfig [−][src]
pub struct NuConfig {
pub vars: IndexMap<String, Value>,
pub file_path: PathBuf,
pub modified_at: Status,
}Fields
vars: IndexMap<String, Value>file_path: PathBufmodified_at: StatusImplementations
impl NuConfig[src]
impl NuConfig[src]pub fn load(cfg_file_path: Option<PathBuf>) -> Result<NuConfig, ShellError>[src]
pub fn write(&self) -> Result<(), ShellError>[src]
pub fn write(&self) -> Result<(), ShellError>[src]Writes self.values under self.file_path
pub fn new() -> NuConfig[src]
pub fn get_last_modified(config_file: &Option<PathBuf>) -> Status[src]
pub fn is_modified(&self) -> Result<bool, Box<dyn Error>>[src]
pub fn var(&self, key: &str) -> Option<Value>[src]
pub fn env(&self) -> Option<Value>[src]
pub fn path(&self) -> Result<Option<Vec<PathBuf>>, ShellError>[src]
pub fn exit_scripts(&self) -> Result<Vec<String>, ShellError>[src]
pub fn startup_scripts(&self) -> Result<Vec<String>, ShellError>[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NuConfig
impl Send for NuConfig
impl Sync for NuConfig
impl Unpin for NuConfig
impl UnwindSafe for NuConfig
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould always be Self
impl<T> SpannedItem for T[src]
impl<T> SpannedItem for T[src]impl<T> TaggedItem for T[src]
impl<T> TaggedItem for T[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,