pub struct CommandGraph {
pub schema: String,
pub fingerprint: String,
pub commands: Vec<CommandNode>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
The whole graph.
Fields§
§schema: StringThe schema of this document.
fingerprint: StringA hash of the semantic content: the identity a cache and a generated projection key on. Nothing that varies between two runs over the same tree is in it.
commands: Vec<CommandNode>Every command, in a deterministic order: origin, then path.
diagnostics: Vec<Diagnostic>What the build found.
Implementations§
Source§impl CommandGraph
impl CommandGraph
Sourcepub fn get(&self, id: &CommandId) -> Option<&CommandNode>
pub fn get(&self, id: &CommandId) -> Option<&CommandNode>
Look one up.
Sourcepub fn resolve(&self, surface: Surface, spelling: &str) -> Option<&CommandNode>
pub fn resolve(&self, surface: Surface, spelling: &str) -> Option<&CommandNode>
Resolve a surface’s spelling of a command back to the canonical node.
This is the one place a surface alias is interpreted. A completion for just
resolves the recipe name here and then asks the same engine the command line asks,
which is why there is no second completion implementation.
Sourcepub fn errors(&self) -> Vec<&Diagnostic>
pub fn errors(&self) -> Vec<&Diagnostic>
The errors, if any. A projection refuses to write when this is not empty.
Sourcepub fn of_origin(&self, origin: Origin) -> impl Iterator<Item = &CommandNode>
pub fn of_origin(&self, origin: Origin) -> impl Iterator<Item = &CommandNode>
The commands of one origin.
Trait Implementations§
Source§impl Clone for CommandGraph
impl Clone for CommandGraph
Source§fn clone(&self) -> CommandGraph
fn clone(&self) -> CommandGraph
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 CommandGraph
impl Debug for CommandGraph
Source§impl<'de> Deserialize<'de> for CommandGraph
impl<'de> Deserialize<'de> for CommandGraph
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
impl Eq for CommandGraph
Source§impl JsonSchema for CommandGraph
impl JsonSchema for CommandGraph
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 PartialEq for CommandGraph
impl PartialEq for CommandGraph
Source§fn eq(&self, other: &CommandGraph) -> bool
fn eq(&self, other: &CommandGraph) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CommandGraph
impl Serialize for CommandGraph
impl StructuralPartialEq for CommandGraph
Auto Trait Implementations§
impl Freeze for CommandGraph
impl RefUnwindSafe for CommandGraph
impl Send for CommandGraph
impl Sync for CommandGraph
impl Unpin for CommandGraph
impl UnsafeUnpin for CommandGraph
impl UnwindSafe for CommandGraph
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
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>,
§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
Compare self to
key and return true if they are equal.