Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Koon Peng <[email protected]>
  • Loading branch information
koonpeng committed Jan 13, 2025
1 parent eae8189 commit f732c07
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/diagram/node_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,16 @@ impl<'a, DeserializeImpl, SerializeImpl, Cloneable>
}
}

/// Register a node builder with the specified common operations.
/// Register a node builder with the specified common operations, using [`DiagramMessage`]
/// to automatically opt in to the following operations:
///
/// * unzip
///
/// # Arguments
///
/// * `id` - Id of the builder, this must be unique.
/// * `name` - Friendly name for the builder, this is only used for display purposes.
/// * `f` - The node builder to register.
/// * `f` - The node builder to register. The request and response must impl [`DiagramMessage`].
pub fn register_with_diagram_message<Config, Request, Response, Streams>(
self,
options: NodeBuilderOptions,
Expand Down Expand Up @@ -634,6 +637,16 @@ impl NodeRegistry {
self.opt_out().register_node_builder(options, builder)
}

/// Similar to `register_node_builder`, but uses [`DiagramMessage`] to automatically
/// opt in to the following operations:
///
/// * unzip
///
/// # Arguments
///
/// * `id` - Id of the builder, this must be unique.
/// * `name` - Friendly name for the builder, this is only used for display purposes.
/// * `f` - The node builder to register. The request and response must impl [`DiagramMessage`].
pub fn register_with_diagram_message<Config, Request, Response, Streams: StreamPack>(
&mut self,
options: NodeBuilderOptions,
Expand Down

0 comments on commit f732c07

Please sign in to comment.