pub struct KnowledgeRecordInput {
pub id: String,
}Expand description
Which knowledge record: the input of knowledge_base.record. The id is the file name
and the identity the index keys the record by, so one string names it on every surface.
use majordomus_cli::capability::builtin::knowledge_base::KnowledgeRecordInput;
let input: KnowledgeRecordInput = serde_json::from_str(r#"{"id":"e1-0123456789ab"}"#).unwrap();
assert_eq!(input.id, "e1-0123456789ab");
// a key the input does not declare is refused, never ignored
assert!(serde_json::from_str::<KnowledgeRecordInput>(r#"{"id":"x","uri":"y"}"#).is_err());Fields§
§id: StringThe record id, as the file name and majordomus://knowledge/<id> carry it.
Trait Implementations§
Source§impl BenchmarkCases for KnowledgeRecordInput
impl BenchmarkCases for KnowledgeRecordInput
Source§fn benchmark_cases(ctx: &CaseContext<'_>) -> Vec<NamedCase<Self>>
fn benchmark_cases(ctx: &CaseContext<'_>) -> Vec<NamedCase<Self>>
The cases, in a stable order. An empty list means “nothing to benchmark in this
repository”, which the coverage check reports as missing.
Source§fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
The cases as JSON, the shape every runner serialises from.
Source§impl Clone for KnowledgeRecordInput
impl Clone for KnowledgeRecordInput
Source§fn clone(&self) -> KnowledgeRecordInput
fn clone(&self) -> KnowledgeRecordInput
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 KnowledgeRecordInput
impl Debug for KnowledgeRecordInput
Source§impl<'de> Deserialize<'de> for KnowledgeRecordInput
impl<'de> Deserialize<'de> for KnowledgeRecordInput
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 KnowledgeRecordInput
impl JsonSchema for KnowledgeRecordInput
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 KnowledgeRecordInput
impl RefUnwindSafe for KnowledgeRecordInput
impl Send for KnowledgeRecordInput
impl Sync for KnowledgeRecordInput
impl Unpin for KnowledgeRecordInput
impl UnsafeUnpin for KnowledgeRecordInput
impl UnwindSafe for KnowledgeRecordInput
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