pub struct ServerBuilder<E, Ctl = DefaultControlService> { /* private fields */ }
Expand description
Builds server with custom configuration values.
Methods can be chained in order to set the configuration values.
New instances of Builder
are obtained via Builder::new
.
See function level documentation for details on the various server configuration settings.
Implementations§
Source§impl<E> ServerBuilder<E>
impl<E> ServerBuilder<E>
Sourcepub fn new() -> ServerBuilder<E>
pub fn new() -> ServerBuilder<E>
Returns a new server builder instance initialized with default configuration values.
Configuration methods can be chained on the return value.
Source§impl<E: Debug, Ctl> ServerBuilder<E, Ctl>
impl<E: Debug, Ctl> ServerBuilder<E, Ctl>
Sourcepub fn control<S, F>(&self, service: F) -> ServerBuilder<E, S>where
F: IntoServiceFactory<S, Control<E>>,
S: ServiceFactory<Control<E>, Response = ControlAck> + 'static,
S::Error: Debug,
S::InitError: Debug,
pub fn control<S, F>(&self, service: F) -> ServerBuilder<E, S>where
F: IntoServiceFactory<S, Control<E>>,
S: ServiceFactory<Control<E>, Response = ControlAck> + 'static,
S::Error: Debug,
S::InitError: Debug,
Service to call with control frames
Source§impl<E, Ctl> ServerBuilder<E, Ctl>where
E: Debug,
Ctl: ServiceFactory<Control<E>, Response = ControlAck> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
impl<E, Ctl> ServerBuilder<E, Ctl>where
E: Debug,
Ctl: ServiceFactory<Control<E>, Response = ControlAck> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
Sourcepub fn finish<F, Pub>(self, service: F) -> Server<Ctl, Pub>where
F: IntoServiceFactory<Pub, Message>,
Pub: ServiceFactory<Message, Response = (), Error = E> + 'static,
Pub::InitError: Debug,
pub fn finish<F, Pub>(self, service: F) -> Server<Ctl, Pub>where
F: IntoServiceFactory<Pub, Message>,
Pub: ServiceFactory<Message, Response = (), Error = E> + 'static,
Pub::InitError: Debug,
Creates a new configured HTTP/2 server.
Trait Implementations§
Source§impl<E: Clone, Ctl: Clone> Clone for ServerBuilder<E, Ctl>
impl<E: Clone, Ctl: Clone> Clone for ServerBuilder<E, Ctl>
Source§fn clone(&self) -> ServerBuilder<E, Ctl>
fn clone(&self) -> ServerBuilder<E, Ctl>
Returns a duplicate 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 moreSource§impl<E> Default for ServerBuilder<E>
impl<E> Default for ServerBuilder<E>
Source§fn default() -> ServerBuilder<E>
fn default() -> ServerBuilder<E>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<E, Ctl> Freeze for ServerBuilder<E, Ctl>where
Ctl: Freeze,
impl<E, Ctl = DefaultControlService> !RefUnwindSafe for ServerBuilder<E, Ctl>
impl<E, Ctl = DefaultControlService> !Send for ServerBuilder<E, Ctl>
impl<E, Ctl = DefaultControlService> !Sync for ServerBuilder<E, Ctl>
impl<E, Ctl> Unpin for ServerBuilder<E, Ctl>
impl<E, Ctl = DefaultControlService> !UnwindSafe for ServerBuilder<E, Ctl>
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