Enum tokio_fastcgi::Role

source ·
pub enum Role {
    Responder,
    Authorizer,
    Filter,
}
Expand description

Enum containing the role that is requested from the FastCGI client. See the different variants for a description of the roles and their input and output streams.

Variants§

§

Responder

A FastCGI responder receives all the information associated with an HTTP request and generates an HTTP response. A responder receives the following information from the web-server:

A responder has the following communication channels at its disposal:

see the FastCGI specification for more Information

§

Authorizer

A FastCGI authorizer receives all the information associated with an HTTP request and generates an authorized/unauthorized decision. In case of an authorized decision the authorizer can also associate name-value pairs with the HTTP request. A responder receives the following information from the web-server:

An authorizer has the following communication channels at its disposal:

see the FastCGI specification for more Information

§

Filter

A FastCGI filter receives all the information associated with an HTTP request, plus an extra stream of data from a file stored on the Web server, and generates a “filtered” version of the data stream as an HTTP response. A filter receives the following information from the web-server:

  • Environment variables, request parameters and additional information (FCGI_DATA_LAST_MOD and FCGI_DATA_LENGTH) (see get_param/get_str_param)
  • StdIn (see get_stdin)
  • File Data from the web-server (see get_data)

A filter has the following communication channels at its disposal:

see the FastCGI specification for more Information

Trait Implementations§

source§

impl Debug for Role

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Role

source§

fn eq(&self, other: &Role) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Role

Auto Trait Implementations§

§

impl RefUnwindSafe for Role

§

impl Send for Role

§

impl Sync for Role

§

impl Unpin for Role

§

impl UnwindSafe for Role

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.