pub struct Builder { /* private fields */ }Expand description
The builder pattern constructor for HttpClient.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn compat_mode(self, mode: CompatMode) -> Self
pub fn compat_mode(self, mode: CompatMode) -> Self
Use the specified compatibility mode for the CometBFT RPC protocol.
The default is the latest protocol version supported by this crate.
Sourcepub fn proxy_url(self, url: HttpClientUrl) -> Self
pub fn proxy_url(self, url: HttpClientUrl) -> Self
Specify the URL of a proxy server for the client to connect through.
If the RPC endpoint is secured (HTTPS), the proxy will automatically attempt to connect using the HTTP CONNECT method.
Sourcepub fn build(self) -> Result<HttpClient, Error>
pub fn build(self) -> Result<HttpClient, Error>
Try to create a client with the options specified for this builder.
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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