pub struct AuthorizationRequest {Show 14 fields
pub decision_id: String,
pub subject: Handle,
pub scope: Scope,
pub step: String,
pub instance: Vec<String>,
pub operation: Operation,
pub target: u32,
pub role: AttemptRole,
pub backend_id: String,
pub artifact: ArtifactId,
pub request: RequestId,
pub attempt_id: String,
pub exposure: Exposure,
pub remaining_ms: u64,
}Expand description
What the runtime presents to the host immediately before one external attempt (spec 026, 3.3): the exact decision, scope, backend, artifact, operation, canonical request identity, maximum cost exposure, remaining time and role. It carries opaque handles and identities only, never a credential.
Fields§
§decision_id: String§subject: Handle§scope: Scope§step: String§instance: Vec<String>§operation: Operation§target: u32§role: AttemptRole§backend_id: String§artifact: ArtifactId§request: RequestIdThe RequestId of this request on this target (spec 004, 3.4).
attempt_id: StringThe attempt’s idempotency key (spec 003, 3.9.2).
exposure: Exposure§remaining_ms: u64Time left before the decision’s deadline, by the runtime’s clock.
Implementations§
Source§impl AuthorizationRequest
impl AuthorizationRequest
Sourcepub fn digest(&self) -> Result<ContentDigest, CanonicalError>
pub fn digest(&self) -> Result<ContentDigest, CanonicalError>
sha256(AUTHORIZATION_REQUEST_TAG || 0x00 || canonical bytes): what
an answer must name to answer exactly this attempt.
Trait Implementations§
Source§impl Clone for AuthorizationRequest
impl Clone for AuthorizationRequest
Source§impl Debug for AuthorizationRequest
impl Debug for AuthorizationRequest
Source§impl<'de> Deserialize<'de> for AuthorizationRequest
impl<'de> Deserialize<'de> for AuthorizationRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AuthorizationRequest
Source§impl JsonSchema for AuthorizationRequest
impl JsonSchema for AuthorizationRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AuthorizationRequest
impl PartialEq for AuthorizationRequest
Source§impl Serialize for AuthorizationRequest
impl Serialize for AuthorizationRequest
impl StructuralPartialEq for AuthorizationRequest
Auto Trait Implementations§
impl Freeze for AuthorizationRequest
impl RefUnwindSafe for AuthorizationRequest
impl Send for AuthorizationRequest
impl Sync for AuthorizationRequest
impl Unpin for AuthorizationRequest
impl UnsafeUnpin for AuthorizationRequest
impl UnwindSafe for AuthorizationRequest
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