Skip to main content

EnvironmentInput

Struct EnvironmentInput 

Source
pub struct EnvironmentInput {
    pub treeboot_root_path: Option<OsString>,
    pub codex_source_tree_path: Option<OsString>,
    pub conductor_root_path: Option<OsString>,
    pub superset_root_path: Option<OsString>,
    pub conductor_default_branch: Option<OsString>,
    pub treeboot_strict: Option<OsString>,
    pub treeboot_dangerously_allow_sources_outside_root: Option<OsString>,
    pub treeboot_dangerously_allow_targets_outside_worktree: Option<OsString>,
}
Expand description

Explicit environment variable input used while resolving treeboot behavior.

This type only models the process environment variables that treeboot reads. Unknown process environment variables are intentionally not captured.

Fields§

§treeboot_root_path: Option<OsString>

Root checkout override from TREEBOOT_ROOT_PATH.

§codex_source_tree_path: Option<OsString>

Root checkout compatibility override from CODEX_SOURCE_TREE_PATH.

§conductor_root_path: Option<OsString>

Root checkout compatibility override from CONDUCTOR_ROOT_PATH.

§superset_root_path: Option<OsString>

Root checkout compatibility override from SUPERSET_ROOT_PATH.

§conductor_default_branch: Option<OsString>

Default branch compatibility override from CONDUCTOR_DEFAULT_BRANCH.

§treeboot_strict: Option<OsString>

Runtime strict-mode override from TREEBOOT_STRICT.

§treeboot_dangerously_allow_sources_outside_root: Option<OsString>

Runtime source-boundary override from TREEBOOT_DANGEROUSLY_ALLOW_SOURCES_OUTSIDE_ROOT.

§treeboot_dangerously_allow_targets_outside_worktree: Option<OsString>

Runtime target-boundary override from TREEBOOT_DANGEROUSLY_ALLOW_TARGETS_OUTSIDE_WORKTREE.

Implementations§

Source§

impl EnvironmentInput

Source

pub const fn empty() -> Self

Returns an empty environment input.

Source

pub fn from_process_env() -> Self

Captures treeboot’s known environment variables from the process.

Empty values are captured as-is; lookup helpers ignore empty values to preserve the CLI compatibility behavior.

Source

pub fn root_candidates(&self) -> impl Iterator<Item = (&'static str, &OsStr)>

Returns non-empty root path candidates in treeboot precedence order.

Source

pub fn conductor_default_branch(&self) -> Option<&OsStr>

Returns the non-empty CONDUCTOR_DEFAULT_BRANCH value.

Trait Implementations§

Source§

impl Clone for EnvironmentInput

Source§

fn clone(&self) -> EnvironmentInput

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EnvironmentInput

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EnvironmentInput

Source§

fn default() -> EnvironmentInput

Returns the “default value” for a type. Read more
Source§

impl Eq for EnvironmentInput

Source§

impl PartialEq for EnvironmentInput

Source§

fn eq(&self, other: &EnvironmentInput) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EnvironmentInput

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.