pub struct RequestBuilder<S> { /* private fields */ }
Available on crate feature
partial-eval
only.Expand description
Builder for a Request
The default for principal, action, resource, and context fields is Unknown for partial evaluation.
This feature is experimental. For more information see https://github.com/cedar-policy/rfcs/blob/main/README.md#experimental-features
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 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
).
Source§impl RequestBuilder<&Schema>
impl RequestBuilder<&Schema>
Trait Implementations§
Source§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
Mutably borrows from an owned value. Read more
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