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::Clientused to send requests.endpoint- Astrrepresentation 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 duplicate 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