pub struct Profile {
pub writable: Vec<PathBuf>,
pub hidden: Vec<PathBuf>,
pub read_only: Vec<PathBuf>,
pub network: Network,
pub tmp: PathBuf,
}Expand description
One command’s confinement.
Fields§
§writable: Vec<PathBuf>Writable trees (the workspace first).
Unreadable trees.
read_only: Vec<PathBuf>Trees inside the writable ones that stay read-only (in place: the
checkout’s .git).
network: NetworkThe network.
tmp: PathBufThe private temporary directory (TMPDIR), writable.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn new(root: &Path, config: &Config, home: Option<&Path>) -> Self
pub fn new(root: &Path, config: &Config, home: Option<&Path>) -> Self
The profile for commands working in root, for the home directory home.
Sourcepub fn carve(self, read_only: &[PathBuf], hidden: &[PathBuf]) -> Self
pub fn carve(self, read_only: &[PathBuf], hidden: &[PathBuf]) -> Self
The same profile with read_only trees carved out of the writable
ones, and hidden added to the unreadable ones.
Sourcepub fn with_network(self, network: Network) -> Self
pub fn with_network(self, network: Network) -> Self
The same profile with another network.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Profile
impl<'de> Deserialize<'de> for Profile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Profile
impl StructuralPartialEq for Profile
Auto Trait Implementations§
impl Freeze for Profile
impl RefUnwindSafe for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
impl UnwindSafe for Profile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.