pub struct ClientBuilder { /* private fields */ }
Expand description
A builder for Client
.
examples:
use pangea_client::ClientBuilder;
use pangea_client::HttpProvider;
let client = ClientBuilder::default()
.endpoint("app.pangea.foundation")
.build::<HttpProvider>();
use pangea_client::ClientBuilder;
use pangea_client::WsProvider;
let client = ClientBuilder::default()
.endpoint("app.pangea.foundation")
.build::<WsProvider>();
Implementations§
Source§impl ClientBuilder
A builder for Client
.
example:
impl ClientBuilder
A builder for Client
.
example:
use pangea_client::ClientBuilder;
use pangea_client::HttpProvider;
let client = ClientBuilder::default()
.endpoint("app.pangea.foundation") // optional; can be specified via .env file
.credential("username", "password") // optional; can be specified via .env file
.build::<HttpProvider>();
Sourcepub fn credential(
self,
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn credential( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
Sets the username of the client.
Trait Implementations§
Source§impl Default for ClientBuilder
Default implementation for ClientBuilder
.
Default endpoint is app.pangea.foundation
.
Default secure is true.
Default username is None.
Default password is None.
impl Default for ClientBuilder
Default implementation for ClientBuilder
.
Default endpoint is app.pangea.foundation
.
Default secure is true.
Default username is None.
Default password is None.
use pangea_client::ClientBuilder;
use pangea_client::HttpProvider;
let client = ClientBuilder::default()
.build::<HttpProvider>();
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin 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