Struct Http3BackendBuilder

Source
pub struct Http3BackendBuilder<F, S: State = Empty> { /* private fields */ }
Available on (crate features http1 or http2 or http3) and crate feature http3 only.
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<F, S: State> Http3BackendBuilder<F, S>

Source

pub fn build(self) -> Http3Backend<F>
where S: IsComplete,

Finish building and return the requested object

Source

pub fn ctx(self, value: Context) -> Http3BackendBuilder<F, SetCtx<S>>
where S::Ctx: IsUnset,

Optional (Some / Option setters). Default: scuffle_context::Context::global().

The [scuffle_context::Context] this server will live by.

Source

pub fn maybe_ctx( self, value: Option<Context>, ) -> Http3BackendBuilder<F, SetCtx<S>>
where S::Ctx: IsUnset,

Optional (Some / Option setters). Default: scuffle_context::Context::global().

The [scuffle_context::Context] this server will live by.

Source

pub fn worker_tasks( self, value: usize, ) -> Http3BackendBuilder<F, SetWorkerTasks<S>>
where S::WorkerTasks: IsUnset,

Optional (Some / Option setters). Default: 1.

The number of worker tasks to spawn for each server backend.

Source

pub fn maybe_worker_tasks( self, value: Option<usize>, ) -> Http3BackendBuilder<F, SetWorkerTasks<S>>
where S::WorkerTasks: IsUnset,

Optional (Some / Option setters). Default: 1.

The number of worker tasks to spawn for each server backend.

Source

pub fn service_factory( self, value: F, ) -> Http3BackendBuilder<F, SetServiceFactory<S>>
where S::ServiceFactory: IsUnset,

Required.

The service factory that will be used to create new services.

Source

pub fn bind(self, value: SocketAddr) -> Http3BackendBuilder<F, SetBind<S>>
where S::Bind: IsUnset,

Required.

The address to bind to.

Use [::] for a dual-stack listener. For example, use [::]:80 to bind to port 80 on both IPv4 and IPv6.

Source

pub fn rustls_config( self, value: ServerConfig, ) -> Http3BackendBuilder<F, SetRustlsConfig<S>>
where S::RustlsConfig: IsUnset,

Required.

rustls config.

Use this field to set the server into TLS mode. It will only accept TLS connections when this is set.

Auto Trait Implementations§

§

impl<F, S> Freeze for Http3BackendBuilder<F, S>
where F: Freeze,

§

impl<F, S = Empty> !RefUnwindSafe for Http3BackendBuilder<F, S>

§

impl<F, S> Send for Http3BackendBuilder<F, S>
where F: Send,

§

impl<F, S> Sync for Http3BackendBuilder<F, S>
where F: Sync,

§

impl<F, S> Unpin for Http3BackendBuilder<F, S>
where F: Unpin,

§

impl<F, S = Empty> !UnwindSafe for Http3BackendBuilder<F, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more