Struct comfyui_api::comfy::Comfy
source · pub struct Comfy { /* private fields */ }
Expand description
Higher-level API for interacting with the ComfyUI API.
Implementations§
source§impl Comfy
impl Comfy
sourcepub fn new() -> Result<Self, ComfyApiError>
pub fn new() -> Result<Self, ComfyApiError>
Returns a new Comfy
instance with default settings.
sourcepub fn new_with_url<S>(url: S) -> Result<Self, ComfyApiError>
pub fn new_with_url<S>(url: S) -> Result<Self, ComfyApiError>
sourcepub fn new_with_client_and_url<S>(
client: Client,
url: S,
) -> Result<Self, ComfyApiError>
pub fn new_with_client_and_url<S>( client: Client, url: S, ) -> Result<Self, ComfyApiError>
sourcepub async fn stream_prompt<'a>(
&'a self,
prompt: &Prompt,
) -> Result<impl FusedStream<Item = Result<NodeOutput, ComfyApiError>> + 'a, ComfyApiError>
pub async fn stream_prompt<'a>( &'a self, prompt: &Prompt, ) -> Result<impl FusedStream<Item = Result<NodeOutput, ComfyApiError>> + 'a, ComfyApiError>
sourcepub async fn execute_prompt(
&self,
prompt: &Prompt,
) -> Result<Vec<NodeOutput>, ComfyApiError>
pub async fn execute_prompt( &self, prompt: &Prompt, ) -> Result<Vec<NodeOutput>, ComfyApiError>
sourcepub async fn upload_file(
&self,
file: Vec<u8>,
) -> Result<ImageUpload, ComfyApiError>
pub async fn upload_file( &self, file: Vec<u8>, ) -> Result<ImageUpload, ComfyApiError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Comfy
impl !RefUnwindSafe for Comfy
impl Send for Comfy
impl Sync for Comfy
impl Unpin for Comfy
impl !UnwindSafe for Comfy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more