[−][src]Struct phroxy::request::Request
Fields
addr: SocketAddr
path: 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,