pub struct GlobalId {
pub source: SourceName,
pub native: NativeId,
}Expand description
One item, qualified by the source it came from.
Rendered <source>:<native> and parsed by splitting on the first colon,
so a native id may contain colons freely.
Fields§
§source: SourceNameThe configured source the item came from.
native: NativeIdThe source’s own opaque id for it.
Implementations§
Source§impl GlobalId
impl GlobalId
Sourcepub const ORIGIN_KEY: &'static str = "onetaskgraph.origin"
pub const ORIGIN_KEY: &'static str = "onetaskgraph.origin"
The reserved metadata key a copied item records the id it was copied from under.
The correspondence between an item and the one it came from lives on the item, in the plugin that owns it, and nowhere else: nothing anywhere holds a mapping, so the invariant that the engine keeps no state between calls is untouched.
Spelled here rather than in the plugin contract because the value is a qualified id, which no plugin ever constructs or interprets — a source stores this key’s value as it stores any other caller-defined one.
Sourcepub fn new(source: SourceName, native: NativeId) -> Self
pub fn new(source: SourceName, native: NativeId) -> Self
Qualify native as belonging to source.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GlobalId
impl<'de> Deserialize<'de> for GlobalId
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>,
impl Eq for GlobalId
Source§impl JsonSchema for GlobalId
impl JsonSchema for GlobalId
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 moreimpl StructuralPartialEq for GlobalId
Auto Trait Implementations§
impl Freeze for GlobalId
impl RefUnwindSafe for GlobalId
impl Send for GlobalId
impl Sync for GlobalId
impl Unpin for GlobalId
impl UnsafeUnpin for GlobalId
impl UnwindSafe for GlobalId
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
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.