Struct zellij_utils::consts::ZELLIJ_PROJ_DIR
source · pub struct ZELLIJ_PROJ_DIR { /* private fields */ }
Methods from Deref<Target = ProjectDirs>§
sourcepub fn project_path(&self) -> &Path
pub fn project_path(&self) -> &Path
Returns the project path fragment used to compute the project’s cache/config/data directories.
The value is derived from the ProjectDirs::from
call and is platform-dependent.
sourcepub fn cache_dir(&self) -> &Path
pub fn cache_dir(&self) -> &Path
Returns the path to the project’s cache directory.
Platform | Value | Example |
---|---|---|
Linux | $XDG_CACHE_HOME /_project_path_ or $HOME /.cache/_project_path_ | /home/alice/.cache/barapp |
macOS | $HOME /Library/Caches/_project_path_ | /Users/Alice/Library/Caches/com.Foo-Corp.Bar-App |
Windows | {FOLDERID_LocalAppData} \_project_path_ \cache | C:\Users\Alice\AppData\Local\Foo Corp\Bar App\cache |
sourcepub fn config_dir(&self) -> &Path
pub fn config_dir(&self) -> &Path
Returns the path to the project’s config directory.
Platform | Value | Example |
---|---|---|
Linux | $XDG_CONFIG_HOME /_project_path_ or $HOME /.config/_project_path_ | /home/alice/.config/barapp |
macOS | $HOME /Library/Application Support/_project_path_ | /Users/Alice/Library/Application Support/com.Foo-Corp.Bar-App |
Windows | {FOLDERID_RoamingAppData} \_project_path_ \config | C:\Users\Alice\AppData\Roaming\Foo Corp\Bar App\config |
sourcepub fn config_local_dir(&self) -> &Path
pub fn config_local_dir(&self) -> &Path
Returns the path to the project’s local config directory.
Platform | Value | Example |
---|---|---|
Linux | $XDG_CONFIG_HOME /_project_path_ or $HOME /.config/_project_path_ | /home/alice/.config/barapp |
macOS | $HOME /Library/Application Support/_project_path_ | /Users/Alice/Library/Application Support/com.Foo-Corp.Bar-App |
Windows | {FOLDERID_LocalAppData} \_project_path_ \config | C:\Users\Alice\AppData\Local\Foo Corp\Bar App\config |
sourcepub fn data_dir(&self) -> &Path
pub fn data_dir(&self) -> &Path
Returns the path to the project’s data directory.
Platform | Value | Example |
---|---|---|
Linux | $XDG_DATA_HOME /_project_path_ or $HOME /.local/share/_project_path_ | /home/alice/.local/share/barapp |
macOS | $HOME /Library/Application Support/_project_path_ | /Users/Alice/Library/Application Support/com.Foo-Corp.Bar-App |
Windows | {FOLDERID_RoamingAppData} \_project_path_ \data | C:\Users\Alice\AppData\Roaming\Foo Corp\Bar App\data |
sourcepub fn data_local_dir(&self) -> &Path
pub fn data_local_dir(&self) -> &Path
Returns the path to the project’s local data directory.
Platform | Value | Example |
---|---|---|
Linux | $XDG_DATA_HOME /_project_path_ or $HOME /.local/share/_project_path_ | /home/alice/.local/share/barapp |
macOS | $HOME /Library/Application Support/_project_path_ | /Users/Alice/Library/Application Support/com.Foo-Corp.Bar-App |
Windows | {FOLDERID_LocalAppData} \_project_path_ \data | C:\Users\Alice\AppData\Local\Foo Corp\Bar App\data |
sourcepub fn preference_dir(&self) -> &Path
pub fn preference_dir(&self) -> &Path
Returns the path to the project’s preference directory.
Platform | Value | Example |
---|---|---|
Linux | $XDG_CONFIG_HOME /_project_path_ or $HOME /.config/_project_path_ | /home/alice/.config/barapp |
macOS | $HOME /Library/Preferences/_project_path_ | /Users/Alice/Library/Preferences/com.Foo-Corp.Bar-App |
Windows | {FOLDERID_RoamingAppData} \_project_path_ \config | C:\Users\Alice\AppData\Roaming\Foo Corp\Bar App\config |
sourcepub fn runtime_dir(&self) -> Option<&Path>
pub fn runtime_dir(&self) -> Option<&Path>
Returns the path to the project’s runtime directory.
The runtime directory contains transient, non-essential data (like sockets or named pipes) that is expected to be cleared when the user’s session ends.
Platform | Value | Example |
---|---|---|
Linux | $XDG_RUNTIME_DIR /_project_path_ | /run/user/1001/barapp |
macOS | – | – |
Windows | – | – |
sourcepub fn state_dir(&self) -> Option<&Path>
pub fn state_dir(&self) -> Option<&Path>
Returns the path to the project’s state directory.
The state directory contains data that should be retained between sessions (unlike the runtime directory), but may not be important/portable enough to be synchronized across machines (unlike the config/preferences/data directories).
The returned value depends on the operating system and is either a Some
, containing a value from the following table, or a None
.
Platform | Value | Example |
---|---|---|
Linux | $XDG_STATE_HOME /_project_path_ or $HOME /.local/state/_project_path_ | /home/alice/.local/state/barapp |
macOS | – | – |
Windows | – | – |
Trait Implementations§
source§impl Deref for ZELLIJ_PROJ_DIR
impl Deref for ZELLIJ_PROJ_DIR
§type Target = ProjectDirs
type Target = ProjectDirs
source§fn deref(&self) -> &ProjectDirs
fn deref(&self) -> &ProjectDirs
impl LazyStatic for ZELLIJ_PROJ_DIR
Auto Trait Implementations§
impl Freeze for ZELLIJ_PROJ_DIR
impl RefUnwindSafe for ZELLIJ_PROJ_DIR
impl Send for ZELLIJ_PROJ_DIR
impl Sync for ZELLIJ_PROJ_DIR
impl Unpin for ZELLIJ_PROJ_DIR
impl UnwindSafe for ZELLIJ_PROJ_DIR
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
source§fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
source§fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
source§fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
source§fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
source§fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
source§fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
source§fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
source§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
source§fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
source§fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
source§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
source§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
source§fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
source§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
source§fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
source§fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
source§fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
source§fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
source§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
source§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
source§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
source§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
source§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
source§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
source§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
source§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
source§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
source§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
source§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
source§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
source§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
source§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
source§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
source§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
source§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
source§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
source§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
source§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
source§fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
source§fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
source§fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
source§fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
source§fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
source§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
source§fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
source§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read moresource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more