pub struct IncludeCtx {
pub dir: Option<PathBuf>,
pub policy: IncludePolicy,
/* private fields */
}Expand description
Where and how copy "file" includes resolve: the current directory (the
including file’s own dir, which varies as includes nest) plus the fixed
IncludePolicy and its canonicalized fence root.
Fields§
§dir: Option<PathBuf>Directory relative includes resolve against; None when parsing has
no filesystem context (WASM/bindings without base).
policy: IncludePolicyPolicy applied to every filesystem include in this compilation.
Implementations§
Source§impl IncludeCtx
impl IncludeCtx
Sourcepub fn unrestricted(dir: Option<PathBuf>) -> Self
pub fn unrestricted(dir: Option<PathBuf>) -> Self
The CLI behavior: resolve against dir, no restrictions.
Sourcepub fn with_policy(dir: Option<PathBuf>, policy: IncludePolicy) -> Self
pub fn with_policy(dir: Option<PathBuf>, policy: IncludePolicy) -> Self
Build a context for dir under policy, canonicalizing the fence
root for SandboxedToBase (fails closed if it cannot resolve).
Trait Implementations§
Source§impl Clone for IncludeCtx
impl Clone for IncludeCtx
Source§fn clone(&self) -> IncludeCtx
fn clone(&self) -> IncludeCtx
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 IncludeCtx
impl Debug for IncludeCtx
Source§impl Default for IncludeCtx
impl Default for IncludeCtx
Source§fn default() -> IncludeCtx
fn default() -> IncludeCtx
Returns the “default value” for a type. Read more
Source§impl PartialEq for IncludeCtx
impl PartialEq for IncludeCtx
Source§fn eq(&self, other: &IncludeCtx) -> bool
fn eq(&self, other: &IncludeCtx) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for IncludeCtx
Auto Trait Implementations§
impl Freeze for IncludeCtx
impl RefUnwindSafe for IncludeCtx
impl Send for IncludeCtx
impl Sync for IncludeCtx
impl Unpin for IncludeCtx
impl UnsafeUnpin for IncludeCtx
impl UnwindSafe for IncludeCtx
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