pub struct BuildServer<BS>(pub BS);Expand description
A Transformation to turn a Builder into a Server.
The value wrapped in this shall be a closure taking:
- The
Builder - The configuration fragment (
HyperServer) - A
&strname - A
Receiver<()>.
It shall produce a server wrapped with a graceful shutdown. Technically, it can produce
whatever future that’ll terminate once the Receiver contains something.
Constructing the server builder directly is a bit of a chore (bunch of cloning, lifetimes, and
it’s something like 3rd-order function ‒ function that returns a function that returns a
function…). In many cases, the server_from_handler can help.
An instance of ServerBuilder goes inside.
Tuple Fields§
§0: BSTrait Implementations§
Source§impl<Tr, Inst, BS> Transformation<Builder<Acceptor<<Tr as Fragment>::Resource>>, Inst, HyperServer<Tr>> for BuildServer<BS>
impl<Tr, Inst, BS> Transformation<Builder<Acceptor<<Tr as Fragment>::Resource>>, Inst, HyperServer<Tr>> for BuildServer<BS>
Source§type OutputResource = Activate<<BS as ServerBuilder<Tr>>::OutputFut>
type OutputResource = Activate<<BS as ServerBuilder<Tr>>::OutputFut>
The type of resource after the transformation.
Source§type OutputInstaller = FutureInstaller
type OutputInstaller = FutureInstaller
The type of installer after the transformation. Read more
Auto Trait Implementations§
impl<BS> Freeze for BuildServer<BS>where
BS: Freeze,
impl<BS> RefUnwindSafe for BuildServer<BS>where
BS: RefUnwindSafe,
impl<BS> Send for BuildServer<BS>where
BS: Send,
impl<BS> Sync for BuildServer<BS>where
BS: Sync,
impl<BS> Unpin for BuildServer<BS>where
BS: Unpin,
impl<BS> UnwindSafe for BuildServer<BS>where
BS: UnwindSafe,
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