Macro define_plan_node
Source macro_rules! define_plan_node {
(
$(#[$meta:meta])*
pub struct $name:ident {
$($field:ident: $type:ty),* $(,)?
}
enum: $enum_variant:ident
input: ZeroInputNode
) => { ... };
(
$(#[$meta:meta])*
pub struct $name:ident {
$($field:ident: $type:ty),* $(,)?
}
manage_enum: $category:ident :: $variant:ident as $enum_variant:ident
input: ZeroInputNode
) => { ... };
(
$(#[$meta:meta])*
pub struct $name:ident {
$($field:ident: $type:ty),* $(,)?
}
enum: $enum_variant:ident
input: MultipleInputNode
) => { ... };
}
Expand description
Macro for defining plan nodes (ZeroInputNode and MultipleInputNode variants)
§Example
ⓘuse linkrs_query::define_plan_node;
struct TagProp;
define_plan_node! {
pub struct GetVerticesNode {
space_id: i32,
src_vids: String,
tag_props: Vec<TagProp>,
}
enum: GetVertices
input: ZeroInputNode
}