pub enum MemoryTarget {
GlobalShared,
GlobalWorkflow(String),
Cwd,
}Expand description
Where a memory command should target.
Variants§
Implementations§
Source§impl MemoryTarget
impl MemoryTarget
Sourcepub fn from_flags(
workflow: Option<&str>,
global: bool,
cwd: bool,
) -> Result<Self, ZigError>
pub fn from_flags( workflow: Option<&str>, global: bool, cwd: bool, ) -> Result<Self, ZigError>
Resolve from CLI flag combination. Same rules as ResourceTarget.
Sourcepub fn ensure_dir(&self) -> Result<PathBuf, ZigError>
pub fn ensure_dir(&self) -> Result<PathBuf, ZigError>
Resolve to an absolute directory path, creating it if it doesn’t exist.
Sourcepub fn existing_dir(&self) -> Option<PathBuf>
pub fn existing_dir(&self) -> Option<PathBuf>
Resolve to an absolute directory path without creating it.
Trait Implementations§
Source§impl Clone for MemoryTarget
impl Clone for MemoryTarget
Source§fn clone(&self) -> MemoryTarget
fn clone(&self) -> MemoryTarget
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 moreAuto Trait Implementations§
impl Freeze for MemoryTarget
impl RefUnwindSafe for MemoryTarget
impl Send for MemoryTarget
impl Sync for MemoryTarget
impl Unpin for MemoryTarget
impl UnsafeUnpin for MemoryTarget
impl UnwindSafe for MemoryTarget
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