Trait comfyui_api::comfy::setter::SetterExt

source ·
pub trait SetterExt<T, N>
where N: Node + 'static,
{ // Required methods fn set<S>(&mut self, value: T) -> Result<()> where S: Setter<T, N>; fn set_from<S>(&mut self, output_node: &str, value: T) -> Result<()> where S: Setter<T, N>; fn set_node<S>(&mut self, node: &str, value: T) -> Result<()> where S: Setter<T, N>; }
Expand description

Extension methods for Prompt to use Setters to set values on nodes.

Required Methods§

source

fn set<S>(&mut self, value: T) -> Result<()>
where S: Setter<T, N>,

Uses a heuristic to find a Node and set the value on it.

§Inputs
  • value - The value to set.
§Returns

Ok(()) on success, or an error if the node could not be found.

source

fn set_from<S>(&mut self, output_node: &str, value: T) -> Result<()>
where S: Setter<T, N>,

Finds a Node leading into the given output_node and sets the value on it.

§Inputs
  • output_node - The id of the node to path from.
§Returns

Ok(()) on success, or an error if the node could not be found.

source

fn set_node<S>(&mut self, node: &str, value: T) -> Result<()>
where S: Setter<T, N>,

Sets the value on the node with id node.

§Inputs
  • node - The id of the node to set the value on.
  • value - The value to set.
§Returns

Ok(()) on success, or an error if the node could not be found.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, N: Node + 'static> SetterExt<T, N> for Prompt