pub struct BatchItemUnsignedResult { /* private fields */ }Expand description
One slot in a batch response’s results array. Callers switch on
is_ok() — on true, read unwrap(); on false, read error().
Implementations§
Source§impl BatchItemUnsignedResult
impl BatchItemUnsignedResult
Sourcepub fn is_ok(&self) -> bool
pub fn is_ok(&self) -> bool
true when Cedar evaluated this item (Allow or Deny); false when it
failed to build.
Sourcepub fn unwrap(&self) -> Result<AuthorizeResult, Error>
pub fn unwrap(&self) -> Result<AuthorizeResult, Error>
The Cedar decision if is_ok(); throws otherwise.
Sourcepub fn error(&self) -> Option<BatchItemError>
pub fn error(&self) -> Option<BatchItemError>
The per-item error if !is_ok(); undefined otherwise.
Trait Implementations§
Source§impl Clone for BatchItemUnsignedResult
impl Clone for BatchItemUnsignedResult
Source§fn clone(&self) -> BatchItemUnsignedResult
fn clone(&self) -> BatchItemUnsignedResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchItemUnsignedResult
impl Debug for BatchItemUnsignedResult
Source§impl From<BatchItemUnsignedResult> for JsValue
impl From<BatchItemUnsignedResult> for JsValue
Source§fn from(value: BatchItemUnsignedResult) -> Self
fn from(value: BatchItemUnsignedResult) -> Self
Converts to this type from the input type.
Source§impl From<Result<AuthorizeResult, BatchItemError>> for BatchItemUnsignedResult
impl From<Result<AuthorizeResult, BatchItemError>> for BatchItemUnsignedResult
Source§impl LongRefFromWasmAbi for BatchItemUnsignedResult
impl LongRefFromWasmAbi for BatchItemUnsignedResult
Source§type Abi = WasmPtr<WasmRefCell<BatchItemUnsignedResult>>
type Abi = WasmPtr<WasmRefCell<BatchItemUnsignedResult>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<BatchItemUnsignedResult>
type Anchor = RcRef<BatchItemUnsignedResult>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl RefFromWasmAbi for BatchItemUnsignedResult
impl RefFromWasmAbi for BatchItemUnsignedResult
Source§type Abi = WasmPtr<WasmRefCell<BatchItemUnsignedResult>>
type Abi = WasmPtr<WasmRefCell<BatchItemUnsignedResult>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<BatchItemUnsignedResult>
type Anchor = RcRef<BatchItemUnsignedResult>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for BatchItemUnsignedResult
impl RefMutFromWasmAbi for BatchItemUnsignedResult
Source§type Abi = WasmPtr<WasmRefCell<BatchItemUnsignedResult>>
type Abi = WasmPtr<WasmRefCell<BatchItemUnsignedResult>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<BatchItemUnsignedResult>
type Anchor = RcRefMut<BatchItemUnsignedResult>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiimpl SupportsConstructor for BatchItemUnsignedResult
impl SupportsInstanceProperty for BatchItemUnsignedResult
impl SupportsStaticProperty for BatchItemUnsignedResult
Source§impl VectorFromWasmAbi for BatchItemUnsignedResult
impl VectorFromWasmAbi for BatchItemUnsignedResult
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[BatchItemUnsignedResult]>
Source§impl VectorIntoWasmAbi for BatchItemUnsignedResult
impl VectorIntoWasmAbi for BatchItemUnsignedResult
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[BatchItemUnsignedResult]>) -> Self::Abi
Source§impl WasmDescribeVector for BatchItemUnsignedResult
impl WasmDescribeVector for BatchItemUnsignedResult
Auto Trait Implementations§
impl !Send for BatchItemUnsignedResult
impl !Sync for BatchItemUnsignedResult
impl Freeze for BatchItemUnsignedResult
impl RefUnwindSafe for BatchItemUnsignedResult
impl Unpin for BatchItemUnsignedResult
impl UnsafeUnpin for BatchItemUnsignedResult
impl UnwindSafe for BatchItemUnsignedResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.