pub struct Object {
pub kind: String,
pub identity: String,
pub uri: String,
pub title: Option<String>,
pub description: Option<String>,
pub metadata: Value,
pub body: String,
pub content: String,
pub media_type: &'static str,
pub provenance: Provenance,
}Expand description
One declarative object of the layer: a rule, a prompt, a profile, a document.
Fields§
§kind: StringThe kind the repository declared for the class that discovered it.
identity: StringStable identity within the kind: the identity fields joined with @, or the path.
uri: Stringmajordomus://<kind>/<identity>; unique across the index.
title: Option<String>The title, when the kind’s title rule found one.
description: Option<String>The one-line description, when the kind holds one.
metadata: ValueThe parsed metadata: the front matter of a Markdown file, or the whole of a YAML file. Key order is the file’s.
body: StringThe Markdown body without its front matter, or the raw text of a YAML file.
content: StringThe whole file as read.
media_type: &'static strIANA media type of content.
provenance: ProvenanceWhere it came from.
Implementations§
Trait Implementations§
impl Eq for Object
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnsafeUnpin for Object
impl UnwindSafe for Object
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.