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 and onetaskgraph.item_kind — and so does any key it
reserves later, which is why the whole namespace is refused rather than a list.
Trait Implementations§
Source§impl Clone for MetadataKey
impl Clone for MetadataKey
Source§fn clone(&self) -> MetadataKey
fn clone(&self) -> MetadataKey
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 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>,
Deserialize this value from the given Serde deserializer. Read more
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
Converts to this type from the input type.
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>
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 moreSource§impl Ord for MetadataKey
impl Ord for MetadataKey
Source§fn cmp(&self, other: &MetadataKey) -> Ordering
fn cmp(&self, other: &MetadataKey) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MetadataKey
impl PartialEq for MetadataKey
Source§impl PartialOrd for MetadataKey
impl PartialOrd for MetadataKey
Source§impl Serialize for MetadataKey
impl Serialize for MetadataKey
impl StructuralPartialEq for MetadataKey
Auto Trait Implementations§
impl Freeze for MetadataKey
impl RefUnwindSafe for MetadataKey
impl Send for MetadataKey
impl Sync for MetadataKey
impl Unpin for MetadataKey
impl UnsafeUnpin for MetadataKey
impl UnwindSafe for MetadataKey
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