pub struct ApeOptions {
pub path: Option<OsString>,
pub loader: Option<OsString>,
pub cache_dirs: Vec<PathBuf>,
}Expand description
What a launch plan consults, as the child will see it.
Fields§
§path: Option<OsString>The child’s PATH: locates a bare program name, ape and sh.
loader: Option<OsString>An explicit loader, path or bare name; wins over every other choice.
cache_dirs: Vec<PathBuf>Directories to install an extracted loader in, in order. The first
usable one wins; with none usable a sealed memfd is used (Linux).
Implementations§
Source§impl ApeOptions
impl ApeOptions
Sourcepub fn inherited() -> ApeOptions
pub fn inherited() -> ApeOptions
The values a child inherits from this process: PATH,
LOADER_ENV, then CACHE_DIR_ENV ahead of the host default
cache directories.
Sourcepub fn with_overrides<'a>(
clear: bool,
overrides: impl IntoIterator<Item = (&'a OsStr, Option<&'a OsStr>)>,
) -> ApeOptions
pub fn with_overrides<'a>( clear: bool, overrides: impl IntoIterator<Item = (&'a OsStr, Option<&'a OsStr>)>, ) -> ApeOptions
Apply a command’s environment edits over the inherited values; None
removes a variable and clear starts from an empty environment, as
env_clear does. The host default cache directories always follow,
since they do not depend on the child’s environment.
Trait Implementations§
Source§impl Clone for ApeOptions
impl Clone for ApeOptions
Source§fn clone(&self) -> ApeOptions
fn clone(&self) -> ApeOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ApeOptions
impl Debug for ApeOptions
Source§impl Default for ApeOptions
impl Default for ApeOptions
Source§fn default() -> ApeOptions
fn default() -> ApeOptions
Returns the “default value” for a type. Read more
impl Eq for ApeOptions
Source§impl PartialEq for ApeOptions
impl PartialEq for ApeOptions
impl StructuralPartialEq for ApeOptions
Auto Trait Implementations§
impl Freeze for ApeOptions
impl RefUnwindSafe for ApeOptions
impl Send for ApeOptions
impl Sync for ApeOptions
impl Unpin for ApeOptions
impl UnsafeUnpin for ApeOptions
impl UnwindSafe for ApeOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more