Struct comfyui_api::api::prompt::PromptApi
source · pub struct PromptApi { /* private fields */ }Expand description
Struct representing a connection to the ComfyUI API prompt endpoint.
Implementations§
source§impl PromptApi
impl PromptApi
sourcepub fn new<S>(
client: Client,
endpoint: S,
client_id: Uuid,
) -> Result<Self, PromptApiError>
pub fn new<S>( client: Client, endpoint: S, client_id: Uuid, ) -> Result<Self, PromptApiError>
Constructs a new PromptApi client with a given reqwest::Client and ComfyUI API
endpoint.
§Arguments
client- Areqwest::Clientused to send requests.endpoint- Astrrepresentation of the endpoint url.
§Returns
A Result containing a new PromptApi instance on success, or an error if url parsing failed.
sourcepub fn new_with_url(client: Client, endpoint: Url, client_id: Uuid) -> Self
pub fn new_with_url(client: Client, endpoint: Url, client_id: Uuid) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PromptApi
impl !RefUnwindSafe for PromptApi
impl Send for PromptApi
impl Sync for PromptApi
impl Unpin for PromptApi
impl !UnwindSafe for PromptApi
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