pub struct DescriptionBase {
pub type: Type,
pub input: Type,
pub output: Type,
pub error: Type,
pub context: Type,
pub description: Option<String>,
pub externals: Option<Vec<ExternalResource>>,
}Expand description
The base structure describing a node’s type signature and metadata.
Contains information about the node’s input, output, error, and context types, along with optional description and external resource metadata.
Fields§
§type: TypeThe type of the node or flow itself.
input: TypeThe type of input accepted by the node.
output: TypeThe type of output produced by the node.
error: TypeThe type of error that may be returned by the node.
context: TypeThe type of context used when executing the node.
description: Option<String>An optional description of the node or flow.
externals: Option<Vec<ExternalResource>>Optional list of external resources the node uses.
Implementations§
Source§impl DescriptionBase
impl DescriptionBase
Sourcepub fn from<NodeType, Input, Output, Error, Context>() -> Self
pub fn from<NodeType, Input, Output, Error, Context>() -> Self
Creates a DescriptionBase from type parameters.
Sourcepub fn from_node<NodeType, Input, Output, Error, Context>(
_node: &NodeType,
) -> Selfwhere
NodeType: Node<Input, NodeOutput<Output>, Error, Context>,
pub fn from_node<NodeType, Input, Output, Error, Context>(
_node: &NodeType,
) -> Selfwhere
NodeType: Node<Input, NodeOutput<Output>, Error, Context>,
Creates a DescriptionBase from a given Node instance.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets a description.
This is primarily used to provide additional documentation or context.
Sourcepub fn with_externals(self, externals: Vec<ExternalResource>) -> Self
pub fn with_externals(self, externals: Vec<ExternalResource>) -> Self
Sets the external resources.
External resources could include remote calls, file accesses or other types of external services.
Trait Implementations§
Source§impl Clone for DescriptionBase
impl Clone for DescriptionBase
Source§fn clone(&self) -> DescriptionBase
fn clone(&self) -> DescriptionBase
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more