Struct ark_api::http_client::ConnectionBuilder
source · pub struct ConnectionBuilder { /* private fields */ }Expand description
A builder for a GRPC channel.
Implementations§
source§impl ConnectionBuilder
impl ConnectionBuilder
sourcepub fn for_host(host: impl ToString) -> Self
pub fn for_host(host: impl ToString) -> Self
Create a new builder for connection to the specified host.
sourcepub fn with_authentication(self) -> Self
pub fn with_authentication(self) -> Self
Configure the channel to always authenticate as the logged in user.
sourcepub fn with_user_agent(self, user_agent: impl ToString) -> Self
pub fn with_user_agent(self, user_agent: impl ToString) -> Self
Set the user-agent header of all subsequent requests to the provided value.
sourcepub async fn build_grpc(self) -> Result<GrpcChannel, Error>
pub async fn build_grpc(self) -> Result<GrpcChannel, Error>
Finish the builder to construct a gRPC channel.
sourcepub async fn build_http(self) -> Result<HttpClient, Error>
pub async fn build_http(self) -> Result<HttpClient, Error>
Finish the builder to construct the channel.
Auto Trait Implementations§
impl RefUnwindSafe for ConnectionBuilder
impl Send for ConnectionBuilder
impl Sync for ConnectionBuilder
impl Unpin for ConnectionBuilder
impl UnwindSafe for ConnectionBuilder
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