pub struct Check<'a> { /* private fields */ }Expand description
The inputs a request needs that no record carries, and the ring that opens the ones sealed.
Implementations§
Source§impl<'a> Check<'a>
impl<'a> Check<'a>
Sourcepub const fn new(tenant: &'a str, source: TenantSource) -> Self
pub const fn new(tenant: &'a str, source: TenantSource) -> Self
A check rebuilding every request under tenant.
Sourcepub const fn with_keys(self, keys: &'a dyn KeyRing) -> Self
pub const fn with_keys(self, keys: &'a dyn KeyRing) -> Self
Open sealed arguments and inputs with keys. Without a ring they are
Unevaluable::Sealed; with one, a destroyed key is
Unevaluable::Erased.
Sourcepub async fn run<R: BufRead>(
&self,
input: R,
bundle: &dyn PolicyEngine,
candidate: Option<&dyn PolicyEngine>,
) -> Result<Report, CheckError>
pub async fn run<R: BufRead>( &self, input: R, bundle: &dyn PolicyEngine, candidate: Option<&dyn PolicyEngine>, ) -> Result<Report, CheckError>
Evaluate every rebuildable request against bundle, and against
candidate when one is given.
§Errors
When the input is unreadable or not an export, or a supplied ring fails for a reason other than erasure.
Sourcepub async fn rebuild<R: BufRead>(
&self,
input: R,
) -> Result<Vec<RunRequests>, CheckError>
pub async fn rebuild<R: BufRead>( &self, input: R, ) -> Result<Vec<RunRequests>, CheckError>
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Check<'a>
impl<'a> !UnwindSafe for Check<'a>
impl<'a> Freeze for Check<'a>
impl<'a> Send for Check<'a>
impl<'a> Sync for Check<'a>
impl<'a> Unpin for Check<'a>
impl<'a> UnsafeUnpin for Check<'a>
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreCreates a shared type from an unshared type.