pub struct RequestBuilder<S> { /* private fields */ }
partial-eval
only.Expand description
Builder for a Request
The default for principal, action, resource, and context fields is Unknown for partial evaluation.
Implementations§
Source§impl<S> RequestBuilder<S>
impl<S> RequestBuilder<S>
Sourcepub fn principal(self, principal: EntityUid) -> Self
pub fn principal(self, principal: EntityUid) -> Self
Set the principal.
Note that you can create the EntityUid
using .parse()
on any
string (via the FromStr
implementation for EntityUid
).
Sourcepub fn unknown_principal_with_type(self, principal_type: EntityTypeName) -> Self
pub fn unknown_principal_with_type(self, principal_type: EntityTypeName) -> Self
Set the principal to be unknown, but known to belong to a certain entity type.
This information is taken into account when evaluating ‘is’, ‘==’ and ‘!=’ expressions.
Sourcepub fn action(self, action: EntityUid) -> Self
pub fn action(self, action: EntityUid) -> Self
Set the action.
Note that you can create the EntityUid
using .parse()
on any
string (via the FromStr
implementation for EntityUid
).
Sourcepub fn resource(self, resource: EntityUid) -> Self
pub fn resource(self, resource: EntityUid) -> Self
Set the resource.
Note that you can create the EntityUid
using .parse()
on any
string (via the FromStr
implementation for EntityUid
).
Sourcepub fn unknown_resource_with_type(self, resource_type: EntityTypeName) -> Self
pub fn unknown_resource_with_type(self, resource_type: EntityTypeName) -> Self
Set the resource to be unknown, but known to belong to a certain entity type.
This information is taken into account when evaluating ‘is’, ‘==’ and ‘!=’ expressions.
Source§impl RequestBuilder<&Schema>
impl RequestBuilder<&Schema>
Trait Implementations§
Source§impl<S: Clone> Clone for RequestBuilder<S>
impl<S: Clone> Clone for RequestBuilder<S>
Source§fn clone(&self) -> RequestBuilder<S>
fn clone(&self) -> RequestBuilder<S>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<S: Debug> Debug for RequestBuilder<S>
impl<S: Debug> Debug for RequestBuilder<S>
Source§impl Default for RequestBuilder<UnsetSchema>
impl Default for RequestBuilder<UnsetSchema>
Auto Trait Implementations§
impl<S> Freeze for RequestBuilder<S>where
S: Freeze,
impl<S> RefUnwindSafe for RequestBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for RequestBuilder<S>where
S: Send,
impl<S> Sync for RequestBuilder<S>where
S: Sync,
impl<S> Unpin for RequestBuilder<S>where
S: Unpin,
impl<S> UnwindSafe for RequestBuilder<S>where
S: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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