pub struct Server { /* private fields */ }Expand description
Synchronous HTTP server for request/response conversion.
This is a simpler, non-async server that just provides parsing and serialization utilities. It’s useful for testing or when you don’t need full async TCP handling.
Implementations§
Source§impl Server
impl Server
Sourcepub fn parse_request(&self, bytes: &[u8]) -> Result<Request, ParseError>
pub fn parse_request(&self, bytes: &[u8]) -> Result<Request, ParseError>
Sourcepub fn write_response(&self, response: Response) -> ResponseWrite
pub fn write_response(&self, response: Response) -> ResponseWrite
Write a response to bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).