pub struct ChannelPoolBuilder { /* private fields */ }Expand description
Builder for creating a ChannelPool.
Implementations§
Source§impl ChannelPoolBuilder
impl ChannelPoolBuilder
Sourcepub fn new(endpoint: impl Into<EndpointTemplate>) -> Self
pub fn new(endpoint: impl Into<EndpointTemplate>) -> Self
Create a new ChannelPoolBuilder from the given endpoint template.
Sourcepub fn dns_interval(&mut self, dns_interval: impl Into<Duration>) -> &mut Self
pub fn dns_interval(&mut self, dns_interval: impl Into<Duration>) -> &mut Self
Set the DNS check interval.
Set how often the resulting pool will check the DNS for new IP addresses. Default is 5 seconds.
Sourcepub fn build(self) -> ChannelPool
pub fn build(self) -> ChannelPool
Build the ChannelPool.
This function will create a new channel pool from the given endpoint template and settings. This includes starting channel pool’s background tasks.
Trait Implementations§
Source§impl Clone for ChannelPoolBuilder
impl Clone for ChannelPoolBuilder
Source§fn clone(&self) -> ChannelPoolBuilder
fn clone(&self) -> ChannelPoolBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for ChannelPoolBuilder
impl RefUnwindSafe for ChannelPoolBuilder
impl Send for ChannelPoolBuilder
impl Sync for ChannelPoolBuilder
impl Unpin for ChannelPoolBuilder
impl UnwindSafe for ChannelPoolBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request