pub struct Node {
pub id: String,
pub kind: String,
pub label: String,
pub summary: Option<String>,
pub route: Option<String>,
pub source: Option<String>,
pub status: Option<String>,
pub external: bool,
pub facts: BTreeMap<String, Fact>,
}Expand description
One node. id is unique within the graph; kind is what the graph’s node_kinds
declares it to be; route is where the Cockpit shows the thing itself, when it shows
it anywhere.
Fields§
§id: StringUnique within the graph.
kind: StringOne of the graph’s declared node kinds.
label: StringThe short label a renderer draws.
summary: Option<String>One line about the thing, when the source holds one.
route: Option<String>Where the Cockpit shows this thing, when it shows it.
source: Option<String>The repository-relative file the node was derived from, when one file owns it.
status: Option<String>A status word the graph’s own vocabulary defines (accepted, active, query).
external: boolTrue when the node stands for something the graph names but does not hold: a reference that resolves to nothing in this repository.
facts: BTreeMap<String, Fact>What the object’s own kind declares about it, as its schema validated it: the fields of its front matter that are facts about the thing rather than the document itself. A rule carries its class and its statement, a skill its inputs and outputs, a decision its date — the vocabulary that makes each kind worth having, rather than the four fields every kind happens to share.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
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 Node
Source§impl JsonSchema for Node
impl JsonSchema for Node
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 moreSource§impl Ord for Node
impl Ord for Node
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Node
impl PartialOrd for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
key and return true if they are equal.