pub struct Client { /* private fields */ }Expand description
Top-level handle for the Anthropic API.
Implementations§
Source§impl Client
impl Client
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Build a Client from environment variables.
Required: ANTHROPIC_API_KEY.
Optional: ANTHROPIC_BASE_URL (defaults to https://api.anthropic.com).
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Start a fluent builder for explicit construction.
Sourcepub fn messages(&self) -> MessagesService<'_>
pub fn messages(&self) -> MessagesService<'_>
Access the Messages API.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl !UnwindSafe for Client
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