pub struct PolicyEnforcedFs { /* private fields */ }Expand description
A filesystem provider that wraps another and enforces a RuntimePolicy.
All read operations check policy.is_path_readable(); all write operations
check policy.is_path_writable(). If the check fails,
io::ErrorKind::PermissionDenied is returned.
Implementations§
Source§impl PolicyEnforcedFs
impl PolicyEnforcedFs
pub fn new( inner: Arc<dyn FileSystemProvider>, policy: Arc<RuntimePolicy>, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PolicyEnforcedFs
impl !RefUnwindSafe for PolicyEnforcedFs
impl Send for PolicyEnforcedFs
impl Sync for PolicyEnforcedFs
impl Unpin for PolicyEnforcedFs
impl UnsafeUnpin for PolicyEnforcedFs
impl !UnwindSafe for PolicyEnforcedFs
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more