[−][src]Struct allow_me::Request
Represents a request that needs to be evaluated by Policy
engine.
Implementations
impl<RC> Request<RC>
[src]
pub fn new(
identity: impl Into<String>,
operation: impl Into<String>,
resource: impl Into<String>
) -> Result<Self>
[src]
identity: impl Into<String>,
operation: impl Into<String>,
resource: impl Into<String>
) -> Result<Self>
pub fn with_context(
identity: impl Into<String>,
operation: impl Into<String>,
resource: impl Into<String>,
context: RC
) -> Result<Self>
[src]
identity: impl Into<String>,
operation: impl Into<String>,
resource: impl Into<String>,
context: RC
) -> Result<Self>
Creates a new Request
with provided context data.
Errors
Returns an error if either identity or operation is an empty string.
pub fn identity(&self) -> &str
[src]
pub fn operation(&self) -> &str
[src]
pub fn resource(&self) -> &str
[src]
pub fn context(&self) -> Option<&RC>
[src]
Trait Implementations
Auto Trait Implementations
impl<RC> RefUnwindSafe for Request<RC> where
RC: RefUnwindSafe,
[src]
RC: RefUnwindSafe,
impl<RC> Send for Request<RC> where
RC: Send,
[src]
RC: Send,
impl<RC> Sync for Request<RC> where
RC: Sync,
[src]
RC: Sync,
impl<RC> Unpin for Request<RC> where
RC: Unpin,
[src]
RC: Unpin,
impl<RC> UnwindSafe for Request<RC> where
RC: UnwindSafe,
[src]
RC: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,