Skip to main content

EffectivePathContext

Struct EffectivePathContext 

Source
pub struct EffectivePathContext { /* private fields */ }
Expand description

A runtime path context created by crate::EffectiveSandbox::path_context.

The constructor is intentionally private so a filesystem decision cannot accidentally use a context with workspace roots broader than the composed result.

Implementations§

Source§

impl EffectivePathContext

Source

pub fn workspace_roots(&self) -> &[PathBuf]

Returns the workspace roots permitted by the composed result.

Source

pub fn root_paths(&self) -> &[PathBuf]

Returns the system roots retained by the composed runtime context.

Source

pub fn minimal_paths(&self) -> &[PathBuf]

Returns the platform-minimal paths retained by the composed context.

Source

pub fn tmpdir(&self) -> Option<&Path>

Returns the platform temporary directory, if one was supplied.

Source

pub fn slash_tmp(&self) -> Option<&Path>

Returns the conventional /tmp directory, if one was supplied.

Source

pub fn current_directory(&self) -> Option<&Path>

Returns the absolute runtime directory used to resolve or inherit a command working directory.

Source

pub fn resolve(&self, selector: &PathSelector) -> Vec<PathBuf>

Resolves a symbolic selector through this bound effective context.

Source

pub fn glob_search_roots(&self, pattern: &PathPattern) -> Vec<PathBuf>

Returns the concrete scan roots for one validated filesystem pattern.

Workspace patterns are resolved only through the roots retained by this effective context. Absolute patterns produce their own static prefix. The roots are lexical scan anchors, not filesystem authorization.

Source

pub fn pattern_matches(&self, pattern: &PathPattern, path: &Path) -> bool

Tests a path pattern through this composition-bound runtime context.

This method preserves workspace-root narrowing. It is a matcher used by native lowering and is not an authorization result; the final path must still be checked against the complete effective filesystem policy.

Trait Implementations§

Source§

impl Clone for EffectivePathContext

Source§

fn clone(&self) -> EffectivePathContext

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 EffectivePathContext

Source§

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

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

impl Eq for EffectivePathContext

Source§

impl PartialEq for EffectivePathContext

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EffectivePathContext

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.