Struct tsukuyomi_server::server::Server

source ·
pub struct Server<S, Tr = ()> { /* private fields */ }

Implementations§

source§

impl<S> Server<S>

source

pub fn new(new_service: S) -> Server<S>

source§

impl<S, T> Server<S, T>

source

pub fn transport<Tr>(self, transport: Tr) -> Server<S, Tr>
where Tr: Transport,

source

pub fn protocol(self, protocol: Http) -> Server<S, T>

source§

impl<S, Tr> Server<S, Tr>

source

pub fn run_forever(self) -> Result<()>
where S: Send + 'static, <S::Service as Service>::Future: Send + 'static, S::Service: Send + 'static, S::Future: Send + 'static,

source

pub fn run_until<F>(self, signal: F) -> Result<()>
where S: Send + 'static, <S::Service as Service>::Future: Send + 'static, S::Service: Send + 'static, S::Future: Send + 'static, F: Future<Item = ()> + Send + 'static,

Auto Trait Implementations§

§

impl<S, Tr> Freeze for Server<S, Tr>
where S: Freeze, Tr: Freeze,

§

impl<S, Tr = ()> !RefUnwindSafe for Server<S, Tr>

§

impl<S, Tr> Send for Server<S, Tr>
where S: Send, Tr: Send,

§

impl<S, Tr> Sync for Server<S, Tr>
where S: Sync, Tr: Sync,

§

impl<S, Tr> Unpin for Server<S, Tr>
where S: Unpin, Tr: Unpin,

§

impl<S, Tr = ()> !UnwindSafe for Server<S, Tr>

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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

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