[][src]Struct phroxy::request::Request

pub struct Request {
    pub addr: SocketAddr,
    pub path: String,
}

Fields

addr: SocketAddrpath: String

Methods

impl Request[src]

pub fn from(addr: SocketAddr) -> Request[src]

Creates a new Request from a socket address..

pub fn static_file_bytes(&self) -> Option<Cow<'static, [u8]>>[src]

Returns bytes of static file on disk. Ex: css files.

pub fn content_type(&self) -> &str[src]

The HTTP content-type of the file on disk.

pub fn is_static_file(&self) -> bool[src]

Is this request asking for a static file on disk?

pub fn parse(&mut self, line: &str)[src]

Parse HTTP request line to fill out this Request.

pub fn target_url(&self) -> &str[src]

Target URL this request wraps. Non-phroxy URL, like sdf.org.

pub fn short_target_url(&self) -> &str[src]

Target URL without the gopher://

pub fn url(&self) -> String[src]

Return the phroxy URL for this request.

Auto Trait Implementations

impl RefUnwindSafe for Request

impl Send for Request

impl Sync for Request

impl Unpin for Request

impl UnwindSafe for Request

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.