Struct comfyui_api::api::history::HistoryApi
source · pub struct HistoryApi { /* private fields */ }
Expand description
Struct representing a connection to the ComfyUI API history
endpoint.
Implementations§
source§impl HistoryApi
impl HistoryApi
sourcepub fn new<S>(client: Client, endpoint: S) -> Result<Self, HistoryApiError>
pub fn new<S>(client: Client, endpoint: S) -> Result<Self, HistoryApiError>
Constructs a new HistoryApi
client with a given reqwest::Client
and ComfyUI API
endpoint.
§Arguments
client
- Areqwest::Client
used to send requests.endpoint
- Astr
representation of the endpoint url.
§Returns
A Result
containing a new HistoryApi
instance on success, or an error if url parsing failed.
sourcepub fn new_with_url(client: Client, endpoint: Url) -> Self
pub fn new_with_url(client: Client, endpoint: Url) -> Self
sourcepub async fn get(&self) -> Result<History, HistoryApiError>
pub async fn get(&self) -> Result<History, HistoryApiError>
Sends a history request using the HistoryApi client.
§Returns
A Result
containing a History
on success, or an error if the request failed.
sourcepub async fn get_prompt(
&self,
prompt_id: &Uuid,
) -> Result<Task, HistoryApiError>
pub async fn get_prompt( &self, prompt_id: &Uuid, ) -> Result<Task, HistoryApiError>
Trait Implementations§
source§impl Clone for HistoryApi
impl Clone for HistoryApi
source§fn clone(&self) -> HistoryApi
fn clone(&self) -> HistoryApi
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HistoryApi
impl !RefUnwindSafe for HistoryApi
impl Send for HistoryApi
impl Sync for HistoryApi
impl Unpin for HistoryApi
impl !UnwindSafe for HistoryApi
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