pub struct CdpPoolBuilder { /* private fields */ }Expand description
CDP 连接池构建器
Implementations§
Source§impl CdpPoolBuilder
impl CdpPoolBuilder
Sourcepub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
添加一个 CDP 端点
Sourcepub fn with_named_endpoint(
self,
name: impl Into<String>,
endpoint: impl Into<String>,
) -> Self
pub fn with_named_endpoint( self, name: impl Into<String>, endpoint: impl Into<String>, ) -> Self
添加一个带名称的 CDP 端点
Sourcepub fn with_strategy(self, strategy: CdpStrategy) -> Self
pub fn with_strategy(self, strategy: CdpStrategy) -> Self
设置端点选择策略(默认 RoundRobin)
设置导航超时(默认 30 秒,应用到所有端点)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CdpPoolBuilder
impl RefUnwindSafe for CdpPoolBuilder
impl Send for CdpPoolBuilder
impl Sync for CdpPoolBuilder
impl Unpin for CdpPoolBuilder
impl UnsafeUnpin for CdpPoolBuilder
impl UnwindSafe for CdpPoolBuilder
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