Struct HttpParser

Source
pub struct HttpParser<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> HttpParser<'a>

Source

pub fn new(buf: &'a [u8]) -> HttpParser<'a>

Source

pub fn parse(&mut self)

Source

pub fn set_method(&mut self, method: HttpMethod)

Source

pub fn set_src(&mut self, method: [usize; 2])

Source

pub fn set_content_length(&mut self, method: [usize; 2])

Source

pub fn set_content_type(&mut self, method: [usize; 2])

Source

pub fn set_body(&mut self, method: [usize; 2])

Source

pub fn get_method(&self) -> &HttpMethod

Source

pub fn get_content_length(&self) -> usize

Source

pub fn get_content_type(&self) -> &str

Source

pub fn get_charset(&self) -> &str

Source

pub fn get_multipart_boundary(&self) -> &str

Source

pub fn get_src(&self) -> &str

Source

pub fn get_body(&self) -> &str

Source

pub fn get_page(&self) -> &str

Source

pub fn get_params(&self) -> &str

Source

pub fn get_params_index(&self) -> (usize, usize)

Source

pub fn get_map(&self, nature: &str, splitter: &str) -> HashMap<&str, &str>

Source

pub fn get_post_params<'b>(&self) -> HashMap<String, String>
where 'a: 'b,

Source

pub fn get_post_params_url_encoded(&self) -> HashMap<String, String>

Source

pub fn get_params_map(&self) -> HashMap<String, String>

Source

pub fn get_body_map(&self) -> HashMap<String, String>

Source

pub fn is_body_read(&self) -> bool

Source

pub fn get_body_remain(&self) -> usize

Source

pub fn check_data(buf: &[u8]) -> usize

Trait Implementations§

Source§

impl<'a> Debug for HttpParser<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for HttpParser<'a>

§

impl<'a> RefUnwindSafe for HttpParser<'a>

§

impl<'a> Send for HttpParser<'a>

§

impl<'a> Sync for HttpParser<'a>

§

impl<'a> Unpin for HttpParser<'a>

§

impl<'a> UnwindSafe for HttpParser<'a>

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>,

Source§

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>,

Source§

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.