pub struct AssetClient { /* private fields */ }Expand description
Client for the Origin Asset Gateway service.
Implementations§
Source§impl AssetClient
impl AssetClient
Sourcepub fn new(api_key: impl Into<String>) -> Self
pub fn new(api_key: impl Into<String>) -> Self
Create a client with the default Asset Gateway base URL.
Sourcepub fn builder(api_key: impl Into<String>) -> AssetClientBuilder
pub fn builder(api_key: impl Into<String>) -> AssetClientBuilder
Create a builder for fine-grained configuration.
pub async fn generate( &self, request: &GenerateRequest, ) -> Result<GenerateResponse>
pub async fn generate_image( &self, prompt: impl Into<String>, options: Option<ImageOptions>, ) -> Result<GenerateResponse>
pub async fn generate_video( &self, prompt: impl Into<String>, options: Option<VideoOptions>, ) -> Result<GenerateResponse>
pub async fn generate_audio( &self, prompt: impl Into<String>, options: Option<AudioOptions>, ) -> Result<GenerateResponse>
pub async fn generate_tts( &self, prompt: impl Into<String>, options: Option<TtsOptions>, ) -> Result<GenerateResponse>
pub async fn generate_music( &self, prompt: impl Into<String>, options: Option<MusicOptions>, ) -> Result<GenerateResponse>
pub async fn generate_model3d( &self, prompt: impl Into<String>, options: Option<Model3dOptions>, ) -> Result<GenerateResponse>
pub async fn generate_sprite( &self, prompt: impl Into<String>, options: Option<SpriteOptions>, ) -> Result<GenerateResponse>
pub async fn process(&self, request: &ProcessRequest) -> Result<ProcessResponse>
pub async fn jobs( &self, status: Option<&str>, limit: Option<u32>, ) -> Result<Vec<JobSummary>>
pub async fn job_status(&self, job_id: &str) -> Result<JobSummary>
pub async fn providers(&self) -> Result<Vec<ProviderInfo>>
pub async fn health(&self) -> Result<bool>
Trait Implementations§
Source§impl Clone for AssetClient
impl Clone for AssetClient
Source§fn clone(&self) -> AssetClient
fn clone(&self) -> AssetClient
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 AssetClient
impl !RefUnwindSafe for AssetClient
impl Send for AssetClient
impl Sync for AssetClient
impl Unpin for AssetClient
impl UnsafeUnpin for AssetClient
impl !UnwindSafe for AssetClient
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