pub struct EnvBuilder { /* private fields */ }Expand description
Environment factory in order to configure the properties.
Implementations§
Source§impl EnvBuilder
impl EnvBuilder
Sourcepub fn new() -> EnvBuilder
pub fn new() -> EnvBuilder
Initialize a new EnvBuilder.
Sourcepub fn cq_count(self, count: usize) -> EnvBuilder
pub fn cq_count(self, count: usize) -> EnvBuilder
Set the number of completion queues and polling threads. Each thread polls one completion queue.
§Panics
This method will panic if count is 0.
Sourcepub fn name_prefix<S>(self, prefix: S) -> EnvBuilder
pub fn name_prefix<S>(self, prefix: S) -> EnvBuilder
Set the thread name prefix of each polling thread.
Sourcepub fn build(self) -> Environment
pub fn build(self) -> Environment
Finalize the EnvBuilder, build the Environment and initialize the gRPC library.
Auto Trait Implementations§
impl Freeze for EnvBuilder
impl RefUnwindSafe for EnvBuilder
impl Send for EnvBuilder
impl Sync for EnvBuilder
impl Unpin for EnvBuilder
impl UnwindSafe for EnvBuilder
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