pub struct MetadataKey(/* private fields */);Expand description
One caller-owned metadata key: <namespace>.<name>, at least two non-empty segments
separated by dots, whose first segment is not MetadataKey::RESERVED_NAMESPACE.
Validated wherever one is built, deserialized included, so a plugin handed one never has to ask whether it names a key this product owns.
Implementations§
Source§impl MetadataKey
impl MetadataKey
Sourcepub const RESERVED_NAMESPACE: &'static str = "onetaskgraph"
pub const RESERVED_NAMESPACE: &'static str = "onetaskgraph"
The namespace this product owns, and a narrow write therefore never names.
Every key the contract reserves lives under it — onetaskgraph.origin,
onetaskgraph.repositories, onetaskgraph.depends_on, onetaskgraph.delivers,
onetaskgraph.delivered_by, onetaskgraph.item_kind and onetaskgraph.template
(Self::TEMPLATE_KEY) — and so does any key it
reserves later, which is why the whole namespace is refused rather than a list.
Sourcepub const TEMPLATE_KEY: &'static str = "onetaskgraph.template"
pub const TEMPLATE_KEY: &'static str = "onetaskgraph.template"
The reserved key a task or a document rendered from a template records where it came from under: an object holding the template’s reference, the chain digest it was rendered with, and the SHA-256 of its content and of its resolved answers.
A key of this product’s own, so no MetadataKey can name it: only a rendering write
— TaskSource::write_task_rendered and
TaskSource::set_task_rendering and their
document siblings — ever sets it, and a copy carries it like any other entry. The
engine builds and reads the value; a plugin only puts it where its metadata lives.
Trait Implementations§
Source§impl Clone for MetadataKey
impl Clone for MetadataKey
Source§impl Debug for MetadataKey
impl Debug for MetadataKey
Source§impl<'de> Deserialize<'de> for MetadataKey
impl<'de> Deserialize<'de> for MetadataKey
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>,
Source§impl Display for MetadataKey
impl Display for MetadataKey
impl Eq for MetadataKey
Source§impl From<MetadataKey> for String
impl From<MetadataKey> for String
Source§fn from(key: MetadataKey) -> Self
fn from(key: MetadataKey) -> Self
Source§impl Hash for MetadataKey
impl Hash for MetadataKey
Source§impl JsonSchema for MetadataKey
impl JsonSchema for MetadataKey
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more