pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
Sourcepub fn new(api_key: &str) -> Self
pub fn new(api_key: &str) -> Self
Create a new client with the given API key.
Example:
use turbopuffer_client::Client;
let api_key = "secret";
let client = Client::new(api_key);Panics: This method panics if a TLS backend cannot be initialized, or the resolver cannot load the system configuration.
Sourcepub fn namespace<'a>(&'a self, namespace: &'a str) -> NamespacedClient<'a>
pub fn namespace<'a>(&'a self, namespace: &'a str) -> NamespacedClient<'a>
Scope the client to a namespace. All following operations will run on this namespace.
Example:
use turbopuffer_client::Client;
let ns = Client::new("secret").namespace("test");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 !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