pub struct CgiService { /* private fields */ }Expand description
A Tower service that executes CGI scripts.
This service implements RFC 3875 and can be used with any Tower-compatible HTTP server such as Axum or Hyper.
Implementations§
Source§impl CgiService
impl CgiService
Sourcepub fn new(command: impl Into<String>) -> Self
pub fn new(command: impl Into<String>) -> Self
Creates a new CGI service with the given command path.
Sourcepub fn with_config(config: CgiConfig) -> Self
pub fn with_config(config: CgiConfig) -> Self
Creates a new CGI service with the given configuration.
Sourcepub fn remote_addr(self, addr: impl Into<String>) -> Self
pub fn remote_addr(self, addr: impl Into<String>) -> Self
Sets the REMOTE_ADDR meta-variable for requests handled by this service.
Trait Implementations§
Source§impl Clone for CgiService
impl Clone for CgiService
Source§fn clone(&self) -> CgiService
fn clone(&self) -> CgiService
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<B> Service<Request<B>> for CgiService
impl<B> Service<Request<B>> for CgiService
Source§type Error = Infallible
type Error = Infallible
Errors produced by the service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<CgiService as Service<Request<B>>>::Response, <CgiService as Service<Request<B>>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<CgiService as Service<Request<B>>>::Response, <CgiService as Service<Request<B>>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl Freeze for CgiService
impl RefUnwindSafe for CgiService
impl Send for CgiService
impl Sync for CgiService
impl Unpin for CgiService
impl UnwindSafe for CgiService
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