Skip to main content

BatchDecisions

Struct BatchDecisions 

Source
pub struct BatchDecisions<O, R, A> {
    pub results: Vec<Result<AuthorizationDecision<O>, AuthorizationError<R, A>>>,
}
Expand description

Ordered results retaining decisions and per-item failures, including denials.

Persistence is sequential and per item, not atomic across this batch. Dropping the future cancels remaining work; earlier writes may already be durable and the in-flight write may be uncertain. No background tasks survive.

Fields§

§results: Vec<Result<AuthorizationDecision<O>, AuthorizationError<R, A>>>

One result per input position. Successful denials retain their audit record.

Implementations§

Source§

impl<O, R, A> BatchDecisions<O, R, A>

Source

pub fn into_strict(self) -> Result<Vec<AuthorizationDecision<O>>, Self>

Returns all decisions only if every item completed required persistence.

§Errors

Returns the entire batch, preserving all item evidence, if any failed. This controls response handling; it does not roll back previous writes.

Trait Implementations§

Source§

impl<O: Debug, R: Debug, A: Debug> Debug for BatchDecisions<O, R, A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<O, R, A> !RefUnwindSafe for BatchDecisions<O, R, A>

§

impl<O, R, A> !UnwindSafe for BatchDecisions<O, R, A>

§

impl<O, R, A> Freeze for BatchDecisions<O, R, A>

§

impl<O, R, A> Send for BatchDecisions<O, R, A>

§

impl<O, R, A> Sync for BatchDecisions<O, R, A>

§

impl<O, R, A> Unpin for BatchDecisions<O, R, A>

§

impl<O, R, A> UnsafeUnpin for BatchDecisions<O, R, A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.