Struct comfyui_api::api::upload::UploadApi
source · pub struct UploadApi { /* private fields */ }
Expand description
Struct representing a connection to the ComfyUI API upload
endpoint.
Implementations§
source§impl UploadApi
impl UploadApi
sourcepub fn new<S>(client: Client, endpoint: S) -> Result<Self, UploadApiError>
pub fn new<S>(client: Client, endpoint: S) -> Result<Self, UploadApiError>
Constructs a new UploadApi
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 UploadApi
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 image(&self, image: Vec<u8>) -> Result<ImageUpload, UploadApiError>
pub async fn image(&self, image: Vec<u8>) -> Result<ImageUpload, UploadApiError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UploadApi
impl !RefUnwindSafe for UploadApi
impl Send for UploadApi
impl Sync for UploadApi
impl Unpin for UploadApi
impl !UnwindSafe for UploadApi
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