pub struct LocalServerBuilder<H, T: LocalTransport> { /* private fields */ }Expand description
Builder for LocalServer.
Single-threaded counterpart of crate::ServerBuilder; the type
parameter T selects a LocalTransport backend rather than the
multi-threaded Transport family.
Implementations§
Source§impl<H: MessageHandler, T: LocalTransport> LocalServerBuilder<H, T>
impl<H: MessageHandler, T: LocalTransport> LocalServerBuilder<H, T>
Sourcepub fn bind(self, addr: SocketAddr) -> Self
pub fn bind(self, addr: SocketAddr) -> Self
Sets the bind address. Clears any previously-supplied
bind_config since the address is now
ambiguous.
Sourcepub fn bind_config(self, config: T::BindConfig) -> Self
pub fn bind_config(self, config: T::BindConfig) -> Self
Supplies a backend-specific bind configuration.
Sourcepub fn max_connections(self, max: usize) -> Self
pub fn max_connections(self, max: usize) -> Self
Sets the maximum number of concurrent sessions.
Sourcepub fn channel_capacity(self, capacity: usize) -> Self
pub fn channel_capacity(self, capacity: usize) -> Self
Sets the cmd/event channel capacity.
Sourcepub fn build(self) -> (LocalServer<H, T>, ServerHandle)
pub fn build(self) -> (LocalServer<H, T>, ServerHandle)
Trait Implementations§
Source§impl<H: MessageHandler, T: LocalTransport> Default for LocalServerBuilder<H, T>
impl<H: MessageHandler, T: LocalTransport> Default for LocalServerBuilder<H, T>
Auto Trait Implementations§
impl<H, T> Freeze for LocalServerBuilder<H, T>
impl<H, T> RefUnwindSafe for LocalServerBuilder<H, T>
impl<H, T> Send for LocalServerBuilder<H, T>
impl<H, T> Sync for LocalServerBuilder<H, T>
impl<H, T> Unpin for LocalServerBuilder<H, T>
impl<H, T> UnsafeUnpin for LocalServerBuilder<H, T>
impl<H, T> UnwindSafe for LocalServerBuilder<H, T>
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