pub struct HyperService { /* private fields */ }Expand description
FetchletService as a hyper 1 service.
Serve each accepted connection with HyperService::connection so the
default context’s client address is the peer address. The service itself
also implements hyper’s trait, for connections without a peer address.
Everything else, including the public origin, body budgets, the trusted
Context and error responses, is the Tower service’s behavior.
Implementations§
Source§impl HyperService
impl HyperService
pub fn new(app: AppHandle, public_origin: &str) -> Result<Self, Error>
Sourcepub fn connection(&self, peer: SocketAddr) -> HyperConnection
pub fn connection(&self, peer: SocketAddr) -> HyperConnection
The service for one connection from peer.
Sourcepub fn trusted_context(
self,
context: impl Fn(&Parts) -> Context + Send + Sync + 'static,
) -> Self
pub fn trusted_context( self, context: impl Fn(&Parts) -> Context + Send + Sync + 'static, ) -> Self
Sourcepub fn stream_request_bodies(self) -> Self
pub fn stream_request_bodies(self) -> Self
Sourcepub fn into_inner(self) -> FetchletService
pub fn into_inner(self) -> FetchletService
The underlying Tower service.
Trait Implementations§
Source§impl Clone for HyperService
impl Clone for HyperService
Auto Trait Implementations§
impl !Freeze for HyperService
impl !RefUnwindSafe for HyperService
impl !UnwindSafe for HyperService
impl Forget for HyperService
impl Move for HyperService
impl Send for HyperService
impl Sync for HyperService
impl Unpin for HyperService
impl UnsafeUnpin for HyperService
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