ServerParams

Struct ServerParams 

Source
pub struct ServerParams<Incoming, Store, Executor, Logger>
where Incoming: Stream, Store: Storage + Clone + Send, Executor: Executor<Box<dyn Future<Item = (), Error = ()> + Send + 'static>>, Logger: Into<Logger>,
{ pub incoming_clients: Incoming, pub storage: Store, pub executor: Executor, pub logger: Logger, }
Expand description

Parameters the server needs to run

Since there are several parameters the server needs, it’s better to pass them as struct containing them.

Fields§

§incoming_clients: Incoming

Clients that are accepted.

§storage: Store

The implementation of configuration storage.

§executor: Executor

Futures executor used for handling the clients.

§logger: Logger

slog Logger used for logging.

Auto Trait Implementations§

§

impl<Incoming, Store, Executor, Logger> Freeze for ServerParams<Incoming, Store, Executor, Logger>
where Incoming: Freeze, Store: Freeze, Executor: Freeze, Logger: Freeze,

§

impl<Incoming, Store, Executor, Logger> RefUnwindSafe for ServerParams<Incoming, Store, Executor, Logger>
where Incoming: RefUnwindSafe, Store: RefUnwindSafe, Executor: RefUnwindSafe, Logger: RefUnwindSafe,

§

impl<Incoming, Store, Executor, Logger> Send for ServerParams<Incoming, Store, Executor, Logger>
where Incoming: Send, Executor: Send, Logger: Send,

§

impl<Incoming, Store, Executor, Logger> Sync for ServerParams<Incoming, Store, Executor, Logger>
where Incoming: Sync, Store: Sync, Executor: Sync, Logger: Sync,

§

impl<Incoming, Store, Executor, Logger> Unpin for ServerParams<Incoming, Store, Executor, Logger>
where Incoming: Unpin, Store: Unpin, Executor: Unpin, Logger: Unpin,

§

impl<Incoming, Store, Executor, Logger> UnwindSafe for ServerParams<Incoming, Store, Executor, Logger>
where Incoming: UnwindSafe, Store: UnwindSafe, Executor: UnwindSafe, Logger: UnwindSafe,

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.

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

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,