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>

source

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

pub fn configure<'a, F, R>(&'a self, f: F) -> &'a Selfwhere F: FnOnce(&'a Config) -> R + 'a,

Configure connection settings

source§

impl<E: Debug, Ctl> ServerBuilder<E, Ctl>

source

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,

source

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>

source§

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)

Performs copy-assignment from source. Read more
source§

impl<E: Debug, Ctl: Debug> Debug for ServerBuilder<E, Ctl>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<E> Default for ServerBuilder<E>

source§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.