pub struct RecognitionResponse {
pub action: String,
pub authority_id: String,
pub context: Option<QueryContext>,
pub entity_id: String,
pub ext: Option<Ext>,
pub message: Option<String>,
pub recognized: bool,
pub resource: String,
pub time_evaluated: DateTime<Utc>,
pub time_requested: Option<DateTime<Utc>>,
}Expand description
Response
JSON schema
{
"title": "Response",
"type": "object",
"required": [
"action",
"authority_id",
"entity_id",
"recognized",
"resource",
"time_evaluated"
],
"properties": {
"action": {
"type": "string"
},
"authority_id": {
"type": "string"
},
"context": {
"$ref": "#/definitions/QueryContext"
},
"entity_id": {
"type": "string"
},
"ext": {
"$ref": "#/definitions/Ext"
},
"message": {
"description": "Additional human-readable detail about the recognition response.",
"type": "string"
},
"recognized": {
"description": "True if the action+resource has been recognised, false otherwise.",
"type": "boolean"
},
"resource": {
"type": "string"
},
"time_evaluated": {
"description": "Server time the query was evaluated at, per the endpoint clock.",
"type": "string",
"format": "date-time"
},
"time_requested": {
"description": "The requested server time, echoed from the request `context.time` when supplied.",
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"$anchor": "response"
}Fields§
§action: String§context: Option<QueryContext>§entity_id: String§ext: Option<Ext>§message: Option<String>Additional human-readable detail about the recognition response.
recognized: boolTrue if the action+resource has been recognised, false otherwise.
resource: String§time_evaluated: DateTime<Utc>Server time the query was evaluated at, per the endpoint clock.
time_requested: Option<DateTime<Utc>>The requested server time, echoed from the request context.time when supplied.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Response, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Response, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Payload for Response
impl Payload for Response
Source§const TYPE_URI: &'static str = "https://trusttasks.org/spec/registry/recognition/0.1#response"
const TYPE_URI: &'static str = "https://trusttasks.org/spec/registry/recognition/0.1#response"
The canonical Type URI this payload targets, including the
#response
fragment for success-response payloads (SPEC.md §4.4.1).Source§const IS_RECIPIENT_REQUIRED: bool = true
const IS_RECIPIENT_REQUIRED: bool = true
Whether the originating Trust Task specification obliges a consumer
to reject a document that arrives without an in-band
recipient, per
SPEC.md §7.2 item 5 and §7.3 item 5 (the party filling the recipient
member is declared REQUIRED). Read moreSource§const PAYLOAD_SCHEMA: Option<&'static str>
const PAYLOAD_SCHEMA: Option<&'static str>
Raw text of the
payload.schema.json describing values of this type,
or None where this build has no schema for it. Read moreSource§const IS_BEARER: bool = false
const IS_BEARER: bool = false
Whether the originating Trust Task specification is a bearer
specification per SPEC.md §4.8.3 — that is, opts out of the §4.8.2
audience-binding rule. Read more
Source§const IS_PROOF_REQUIRED: bool = false
const IS_PROOF_REQUIRED: bool = false
Whether the originating Trust Task specification obliges a consumer
to reject a document that arrives without a
proof, per SPEC.md §7.3
item 8 (proofRequirement.requirement == "REQUIRED"). Read moreSource§fn extended_code(local: impl Into<String>) -> TrustTaskCode
fn extended_code(local: impl Into<String>) -> TrustTaskCode
Build an extended
TrustTaskCode under this payload’s slug, per
SPEC.md §8.5. Read moreSource§fn family_code(namespace: &str, local: impl Into<String>) -> TrustTaskCode
fn family_code(namespace: &str, local: impl Into<String>) -> TrustTaskCode
Build an extended
TrustTaskCode under a family namespace, per
SPEC.md §8.5 rule 2. Read moreSource§impl Serialize for Response
impl Serialize for Response
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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