pub struct Grants<'a> { /* private fields */ }Expand description
The manifests to measure, and the ring that opens sealed arguments.
Implementations§
Source§impl<'a> Grants<'a>
impl<'a> Grants<'a>
Sourcepub const fn new(manifests: &'a [Manifest]) -> Self
pub const fn new(manifests: &'a [Manifest]) -> Self
A report measuring the export against manifests.
Sourcepub const fn with_keys(self, tenant: &'a str, keys: &'a dyn KeyRing) -> Self
pub const fn with_keys(self, tenant: &'a str, keys: &'a dyn KeyRing) -> Self
Open sealed arguments with keys, as tenant’s. A destroyed key is
counted erased; any other ring failure fails the report.
Sourcepub async fn run<R: BufRead>(
&self,
input: R,
) -> Result<GrantReport, GrantsError>
pub async fn run<R: BufRead>( &self, input: R, ) -> Result<GrantReport, GrantsError>
Read input and report.
§Errors
When the input is unreadable or not an export, a supplied manifest has no digest, or a supplied ring fails for a reason other than erasure.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Grants<'a>
impl<'a> !UnwindSafe for Grants<'a>
impl<'a> Freeze for Grants<'a>
impl<'a> Send for Grants<'a>
impl<'a> Sync for Grants<'a>
impl<'a> Unpin for Grants<'a>
impl<'a> UnsafeUnpin for Grants<'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.