pub struct ApolloConfClientBuilder { /* private fields */ }Available on crate feature
conf only.Expand description
Builder for ApolloConfClient.
Implementations§
Source§impl ApolloConfClientBuilder
impl ApolloConfClientBuilder
Sourcepub fn new_via_config_service(
config_server_url: Url,
) -> ApolloClientResult<Self>
pub fn new_via_config_service( config_server_url: Url, ) -> ApolloClientResult<Self>
Create a client request api via config service.
§Example
use apollo_client::conf::ApolloConfClientBuilder;
use url::Url;
let _builder = ApolloConfClientBuilder::new_via_config_service(
Url::parse("http://localhost:8080").unwrap(),
)
.unwrap();Sourcepub fn with_client_builder(
self,
f: impl FnOnce(ClientBuilder) -> ClientBuilder,
) -> Self
pub fn with_client_builder( self, f: impl FnOnce(ClientBuilder) -> ClientBuilder, ) -> Self
Customize inner http client.
§Example
use apollo_client::conf::ApolloConfClientBuilder;
use std::time::Duration;
use url::Url;
ApolloConfClientBuilder::new_via_config_service(Url::parse("http://localhost:8080").unwrap())
.unwrap()
.with_client_builder(|builder| builder.timeout(Duration::from_secs(6)));Sourcepub fn build(self) -> ApolloClientResult<ApolloConfClient>
pub fn build(self) -> ApolloClientResult<ApolloConfClient>
Build the ApolloConfClient.
Auto Trait Implementations§
impl Freeze for ApolloConfClientBuilder
impl !RefUnwindSafe for ApolloConfClientBuilder
impl Send for ApolloConfClientBuilder
impl Sync for ApolloConfClientBuilder
impl Unpin for ApolloConfClientBuilder
impl !UnwindSafe for ApolloConfClientBuilder
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