pub struct ObjectView {
pub uri: String,
pub id: String,
pub kind: String,
pub identity: String,
pub title: Option<String>,
pub description: Option<String>,
pub metadata: Value,
pub provenance: Provenance,
pub media_type: String,
pub content: String,
}Expand description
One declarative object of the repository’s layer, as a client reads it.
Fields§
§uri: Stringmajordomus://<kind>/<identity>.
id: StringThe capability id, <kind>.<identity>.
kind: StringThe kind the object was read as (rule, prompt, document, …).
identity: StringThe identity within the kind (majordomus.scope-integrity@1, continue, a path).
title: Option<String>The title the kind’s title rule found, when it found one.
description: Option<String>The one-line description the kind’s description field held, when it held one.
metadata: ValueThe parsed front matter or YAML, keys in the file’s order.
provenance: ProvenanceWhere the object came from: path, directory, source class, section, size, member.
media_type: StringIANA media type of content (text/markdown, application/yaml, application/json, text/plain).
content: StringThe file as read.
Trait Implementations§
Source§impl Clone for ObjectView
impl Clone for ObjectView
Source§fn clone(&self) -> ObjectView
fn clone(&self) -> ObjectView
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 ObjectView
impl Debug for ObjectView
Source§impl<'de> Deserialize<'de> for ObjectView
impl<'de> Deserialize<'de> for ObjectView
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 ObjectView
impl JsonSchema for ObjectView
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 ObjectView
impl RefUnwindSafe for ObjectView
impl Send for ObjectView
impl Sync for ObjectView
impl Unpin for ObjectView
impl UnsafeUnpin for ObjectView
impl UnwindSafe for ObjectView
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