pub struct InvocationStatement {
pub workspace: String,
pub invocation: InvocationId,
pub target: RemoteActionTarget,
pub arguments: [u8; 32],
pub on_behalf_of: Option<InvocationId>,
pub issued_at_ns: u64,
pub signer: [u8; 32],
}Expand description
What the caller’s key states about one invocation.
Fields§
§workspace: StringThe workspace the invocation acts in, as its id’s text.
invocation: InvocationId§target: RemoteActionTarget§arguments: [u8; 32]argument_hash of the request’s argument.
on_behalf_of: Option<InvocationId>§issued_at_ns: u64The signer’s clock when it signed, in ns since the epoch.
signer: [u8; 32]The key that signs: the one the carried certificate certifies.
Implementations§
Source§impl InvocationStatement
impl InvocationStatement
Sourcepub fn of(
workspace: &str,
request: &InvokeRequest,
issued_at_ns: u64,
signer: [u8; 32],
) -> Self
pub fn of( workspace: &str, request: &InvokeRequest, issued_at_ns: u64, signer: [u8; 32], ) -> Self
The statement signer makes at issued_at_ns about request in
workspace.
Sourcepub fn covers(
&self,
workspace: &str,
request: &InvokeRequest,
) -> Result<(), StatementMismatch>
pub fn covers( &self, workspace: &str, request: &InvokeRequest, ) -> Result<(), StatementMismatch>
Whether this statement covers request in workspace, and if not,
the first part that differs.
§Errors
The StatementMismatch naming that part.
Sourcepub fn signing_message(&self) -> Vec<u8> ⓘ
pub fn signing_message(&self) -> Vec<u8> ⓘ
The bytes the signer’s key signs: the domain separator and the BLAKE3 hash of the statement’s exact encoding.
Sourcepub const fn fresh_at(&self, now_ns: u64) -> bool
pub const fn fresh_at(&self, now_ns: u64) -> bool
Whether the issue time is within INVOCATION_SIGNATURE_TOLERANCE_NS
of now_ns.
Trait Implementations§
Source§impl Clone for InvocationStatement
impl Clone for InvocationStatement
Source§impl Debug for InvocationStatement
impl Debug for InvocationStatement
impl Eq for InvocationStatement
Source§impl PartialEq for InvocationStatement
impl PartialEq for InvocationStatement
impl StructuralPartialEq for InvocationStatement
Auto Trait Implementations§
impl Forget for InvocationStatement
impl Freeze for InvocationStatement
impl Move for InvocationStatement
impl RefUnwindSafe for InvocationStatement
impl Send for InvocationStatement
impl Sync for InvocationStatement
impl Unpin for InvocationStatement
impl UnsafeUnpin for InvocationStatement
impl UnwindSafe for InvocationStatement
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> 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 more