Struct ntex_h2::server::ServerBuilder
source · 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, ControlMessage<E>>,
S: ServiceFactory<ControlMessage<E>, Response = ControlResult> + 'static,
S::Error: Debug,
S::InitError: Debug,
pub fn control<S, F>(&self, service: F) -> ServerBuilder<E, S>where F: IntoServiceFactory<S, ControlMessage<E>>, S: ServiceFactory<ControlMessage<E>, Response = ControlResult> + '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<ControlMessage<E>, Response = ControlResult> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
impl<E, Ctl> ServerBuilder<E, Ctl>where E: Debug, Ctl: ServiceFactory<ControlMessage<E>, Response = ControlResult> + '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 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 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 = 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>where Ctl: Unpin, E: Unpin,
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