pub struct OverrideHomeDir {
pub subpath: PathBuf,
pub overrides: Option<Vec<OverrideFile<Box<dyn Override>>>>,
}Expand description
A directory under the home directory to recursively copy into the sandbox under a temporary directory rather than mapping the real one.
Fields§
§subpath: PathBufThe path of the directory to copy from the host filesystem. These paths are interpreted as relative paths below the user’s home directory.
overrides: Option<Vec<OverrideFile<Box<dyn Override>>>>Arbitrary extra settings to apply to files mapped to the sandbox
Implementations§
Source§impl OverrideHomeDir
impl OverrideHomeDir
Sourcepub fn new(path_segments: impl IntoIterator<Item = impl AsRef<Path>>) -> Self
pub fn new(path_segments: impl IntoIterator<Item = impl AsRef<Path>>) -> Self
Creates a new override home directory for the given path.
Sourcepub fn with_override(
&mut self,
path: impl Into<PathBuf>,
behavior: impl Override + 'static,
) -> &mut Self
pub fn with_override( &mut self, path: impl Into<PathBuf>, behavior: impl Override + 'static, ) -> &mut Self
Adds an override for the given path with the given behavior.
Sourcepub fn take(&mut self) -> Self
pub fn take(&mut self) -> Self
Helper function to get an owned OverrideHomeDir instance from a mutable reference to
facilitate builder-style chaining.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for OverrideHomeDir
impl !Send for OverrideHomeDir
impl !Sync for OverrideHomeDir
impl !UnwindSafe for OverrideHomeDir
impl Freeze for OverrideHomeDir
impl Unpin for OverrideHomeDir
impl UnsafeUnpin for OverrideHomeDir
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