pub struct AllowedPath {
pub path: PathBuf,
pub mode: AccessMode,
}Available on crate feature
sandbox only.Expand description
A filesystem path entry with an access mode.
§Example
use std::path::PathBuf;
use adk_sandbox::sandbox::{AllowedPath, AccessMode};
let entry = AllowedPath {
path: PathBuf::from("/tmp"),
mode: AccessMode::ReadOnly,
};
assert_eq!(entry.mode, AccessMode::ReadOnly);Fields§
§path: PathBufThe filesystem path (directory or file).
mode: AccessModeThe access mode: read-only or read-write.
Trait Implementations§
Source§impl Clone for AllowedPath
impl Clone for AllowedPath
Source§fn clone(&self) -> AllowedPath
fn clone(&self) -> AllowedPath
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 AllowedPath
impl Debug for AllowedPath
Source§impl<'de> Deserialize<'de> for AllowedPath
impl<'de> Deserialize<'de> for AllowedPath
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AllowedPath, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AllowedPath, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AllowedPath
impl PartialEq for AllowedPath
Source§fn eq(&self, other: &AllowedPath) -> bool
fn eq(&self, other: &AllowedPath) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AllowedPath
impl Serialize for AllowedPath
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AllowedPath
Auto Trait Implementations§
impl Freeze for AllowedPath
impl RefUnwindSafe for AllowedPath
impl Send for AllowedPath
impl Sync for AllowedPath
impl Unpin for AllowedPath
impl UnsafeUnpin for AllowedPath
impl UnwindSafe for AllowedPath
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