[][src]Struct allow_me::Request

pub struct Request<RC> { /* fields omitted */ }

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]

Creates a new Request.

Errors

Returns an error if either identity or operation is an empty string.

pub fn with_context(
    identity: impl Into<String>,
    operation: impl Into<String>,
    resource: impl Into<String>,
    context: RC
) -> Result<Self>
[src]

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

impl<RC: Debug> Debug for Request<RC>[src]

Auto Trait Implementations

impl<RC> RefUnwindSafe for Request<RC> where
    RC: RefUnwindSafe
[src]

impl<RC> Send for Request<RC> where
    RC: Send
[src]

impl<RC> Sync for Request<RC> where
    RC: Sync
[src]

impl<RC> Unpin for Request<RC> where
    RC: Unpin
[src]

impl<RC> UnwindSafe for Request<RC> where
    RC: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.