pub struct OperationContext {
pub req: Request,
pub uid: Option<u32>,
pub gid: Option<u32>,
}Fields§
§req: RequestThe original FUSE request
uid: Option<u32>Override UID for internal operations, otherwise use req.uid
gid: Option<u32>Override GID for internal operations, otherwise use req.gid
Implementations§
Source§impl OperationContext
impl OperationContext
Sourcepub fn with_credentials(req: Request, uid: u32, gid: u32) -> Self
pub fn with_credentials(req: Request, uid: u32, gid: u32) -> Self
Create a context with explicit UID/GID override
Sourcepub fn effective_uid(&self) -> Option<u32>
pub fn effective_uid(&self) -> Option<u32>
Get the effective UID (override or from request)
Sourcepub fn effective_gid(&self) -> Option<u32>
pub fn effective_gid(&self) -> Option<u32>
Get the effective GID (override or from request)
Trait Implementations§
Source§impl Clone for OperationContext
impl Clone for OperationContext
Source§fn clone(&self) -> OperationContext
fn clone(&self) -> OperationContext
Returns a duplicate of the value. Read more
1.0.0 · 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 OperationContext
impl Debug for OperationContext
Source§impl From<Request> for OperationContext
impl From<Request> for OperationContext
impl Copy for OperationContext
Auto Trait Implementations§
impl Freeze for OperationContext
impl RefUnwindSafe for OperationContext
impl Send for OperationContext
impl Sync for OperationContext
impl Unpin for OperationContext
impl UnsafeUnpin for OperationContext
impl UnwindSafe for OperationContext
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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