pub struct Request<RC> { /* private fields */ }Expand description
Represents a request that needs to be evaluated by Policy engine.
Implementations§
Source§impl<RC> Request<RC>
impl<RC> Request<RC>
Sourcepub fn new(
identity: impl Into<String>,
operation: impl Into<String>,
resource: impl Into<String>,
) -> Result<Self>
pub fn new( identity: impl Into<String>, operation: impl Into<String>, resource: impl Into<String>, ) -> Result<Self>
Sourcepub fn with_context(
identity: impl Into<String>,
operation: impl Into<String>,
resource: impl Into<String>,
context: RC,
) -> Result<Self>
pub fn with_context( identity: impl Into<String>, operation: impl Into<String>, resource: impl Into<String>, context: RC, ) -> Result<Self>
pub fn identity(&self) -> &str
pub fn operation(&self) -> &str
pub fn resource(&self) -> &str
pub fn context(&self) -> Option<&RC>
Trait Implementations§
Auto Trait Implementations§
impl<RC> Freeze for Request<RC>where
RC: Freeze,
impl<RC> RefUnwindSafe for Request<RC>where
RC: RefUnwindSafe,
impl<RC> Send for Request<RC>where
RC: Send,
impl<RC> Sync for Request<RC>where
RC: Sync,
impl<RC> Unpin for Request<RC>where
RC: Unpin,
impl<RC> UnwindSafe for Request<RC>where
RC: UnwindSafe,
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