Trait comfyui_api::comfy::getter::GetExt

source ·
pub trait GetExt<N>
where N: Node + 'static,
{ // Required methods fn get_typed_node(&self, node: &str) -> Result<&N>; fn get_typed_node_mut(&mut self, node: &str) -> Result<&mut N>; }
Expand description

Extension methods for Prompt to get nodes.

Required Methods§

source

fn get_typed_node(&self, node: &str) -> Result<&N>

Gets a reference to the node with id node.

§Inputs
  • node - The id of the node to get the value from.
§Returns

A Result containing the reference on success, or an error if the node could not be found.

source

fn get_typed_node_mut(&mut self, node: &str) -> Result<&mut N>

Gets a mutable reference to the node with id node.

§Inputs
  • node - The id of the node to get the value from.
§Returns

A Result containing the mutable reference on success, or an error if the node could not be found.

Implementors§

source§

impl<N: Node + 'static> GetExt<N> for Prompt