pub struct OpenRouterClient { /* private fields */ }Implementations§
Source§impl OpenRouterClient
impl OpenRouterClient
pub fn new(api_key: impl Into<String>) -> Self
pub async fn chat( &self, request: ChatRequest, ) -> Result<ChatResponse, OpenRouterError>
Trait Implementations§
Source§impl Clone for OpenRouterClient
impl Clone for OpenRouterClient
Source§fn clone(&self) -> OpenRouterClient
fn clone(&self) -> OpenRouterClient
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 OpenRouterClient
impl !RefUnwindSafe for OpenRouterClient
impl Send for OpenRouterClient
impl Sync for OpenRouterClient
impl Unpin for OpenRouterClient
impl !UnwindSafe for OpenRouterClient
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