Struct solarsail::SolarSail [−][src]
pub struct SolarSail<S, H> { /* fields omitted */ }
Implementations
pub async fn run<F>(self, addr: &SocketAddr) -> Result<(), Error> where
S: Clone + Send + Sync + 'static,
H: Fn(S, Request) -> F + Clone + Send + Sync + 'static,
F: Future<Output = Result<Response, Rejection>> + Send + 'static,
pub async fn run_in<F, L>(
self,
addr: &SocketAddr,
layer: L
) -> Result<(), Error> where
S: Clone + Send + Sync + 'static,
H: Fn(S, Request) -> F + Clone + Send + Sync + 'static,
F: Future<Output = Result<Response, Rejection>> + Send + 'static,
L: Layer<Self>,
L::Service: Service<Request<Body>, Response = Response<Body>> + Clone + Send + Sync + 'static,
<L::Service as Service<Request<Body>>>::Future: Send,
<L::Service as Service<Request<Body>>>::Error: Error + Send + Sync,
Trait Implementations
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Auto Trait Implementations
impl<S, H> RefUnwindSafe for SolarSail<S, H> where
H: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, H> UnwindSafe for SolarSail<S, H> where
H: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self