pub struct ClientBuilder { /* private fields */ }Expand description
客户端 Builder。
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn credentials(self, credentials: Credentials) -> Self
pub fn credentials(self, credentials: Credentials) -> Self
设置认证方式(OAuth/ADC/API Key)。
Sourcepub fn vertex_project(self, project: impl Into<String>) -> Self
pub fn vertex_project(self, project: impl Into<String>) -> Self
设置 Vertex AI 项目 ID。
Sourcepub fn vertex_location(self, location: impl Into<String>) -> Self
pub fn vertex_location(self, location: impl Into<String>) -> Self
设置 Vertex AI 区域。
Sourcepub fn api_version(self, api_version: impl Into<String>) -> Self
pub fn api_version(self, api_version: impl Into<String>) -> Self
设置 API 版本。
Sourcepub fn retry_options(self, retry_options: HttpRetryOptions) -> Self
pub fn retry_options(self, retry_options: HttpRetryOptions) -> Self
设置 HTTP 重试选项。
Sourcepub fn auth_scopes(self, scopes: Vec<String>) -> Self
pub fn auth_scopes(self, scopes: Vec<String>) -> Self
设置 OAuth scopes。
Trait Implementations§
Source§impl Default for ClientBuilder
impl Default for ClientBuilder
Source§fn default() -> ClientBuilder
fn default() -> ClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
impl UnwindSafe for ClientBuilder
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