pub struct ServeOptions<OTx, SRx> {
pub shutdown_rx: SRx,
pub output_tx: OTx,
}Fields§
§shutdown_rx: SRxToken that can be used to gracefully shutdown server
output_tx: OTxChannel where all output will be thrown, outputs will be sent here only if output is not forwarded as a response (client doesn’t wants response)
Implementations§
Source§impl<SRx> ServeOptions<VoidTx, SRx>
impl<SRx> ServeOptions<VoidTx, SRx>
pub const fn with_shutdown_token(shutdown_rx: SRx) -> Self
Trait Implementations§
Source§impl Default for ServeOptions<VoidTx, NoShutdown>
impl Default for ServeOptions<VoidTx, NoShutdown>
Auto Trait Implementations§
impl<OTx, SRx> Freeze for ServeOptions<OTx, SRx>
impl<OTx, SRx> RefUnwindSafe for ServeOptions<OTx, SRx>where
SRx: RefUnwindSafe,
OTx: RefUnwindSafe,
impl<OTx, SRx> Send for ServeOptions<OTx, SRx>
impl<OTx, SRx> Sync for ServeOptions<OTx, SRx>
impl<OTx, SRx> Unpin for ServeOptions<OTx, SRx>
impl<OTx, SRx> UnwindSafe for ServeOptions<OTx, SRx>where
SRx: UnwindSafe,
OTx: 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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