pub struct AnswerView {
pub uri: String,
pub id: String,
pub kind: CapabilityKind,
pub identity: String,
pub title: String,
pub description: Option<String>,
pub answer: Value,
pub provenance: Provenance,
pub media_type: String,
pub content: String,
}Expand description
A URI a query projects (majordomus://repository), answered: the same fields a client
reads on an ObjectView where they apply, the answer itself as data, and the text
resources/read returns for the URI.
Fields§
§uri: StringThe URI as given.
id: StringThe capability that answered (repository.info).
kind: CapabilityKindIts kind: query.
identity: StringThe resource name a client lists (repository).
title: StringThe capability’s title.
description: Option<String>The capability’s description, when it has one.
answer: ValueThe answer, as the capability’s output schema describes it (capabilities.describe
carries that schema).
provenance: ProvenanceWhere the capability comes from: the Rust module it is composed in.
media_type: Stringapplication/json.
content: StringThe answer as text: byte for byte what resources/read returns for the URI.
Trait Implementations§
Source§impl Clone for AnswerView
impl Clone for AnswerView
Source§fn clone(&self) -> AnswerView
fn clone(&self) -> AnswerView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnswerView
impl Debug for AnswerView
Source§impl<'de> Deserialize<'de> for AnswerView
impl<'de> Deserialize<'de> for AnswerView
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
Source§impl JsonSchema for AnswerView
impl JsonSchema for AnswerView
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 moreAuto Trait Implementations§
impl Freeze for AnswerView
impl RefUnwindSafe for AnswerView
impl Send for AnswerView
impl Sync for AnswerView
impl Unpin for AnswerView
impl UnsafeUnpin for AnswerView
impl UnwindSafe for AnswerView
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