Skip to main content

ParserState

Enum ParserState 

Source
#[repr(u8)]
pub enum ParserState {
Show 97 variants Dead = 0, StripDetect = 1, Detect1 = 2, Detect2 = 3, Detect3 = 4, Detect4 = 5, Detect5 = 6, RequestMethod = 7, RequestUrl1 = 8, RequestUrl2 = 9, RequestHttp1 = 10, RequestHttp2 = 11, RequestHttp3 = 12, RequestHttp4 = 13, RequestHttp5 = 14, RequestVersionMajor1 = 15, RequestVersionMajor2 = 16, RequestVersionMajor3 = 17, RequestVersionPeriod = 18, RequestVersionMinor1 = 19, RequestVersionMinor2 = 20, RequestVersionMinor3 = 21, RequestVersionCr = 22, ResponseVersionMajor1 = 23, ResponseVersionMajor2 = 24, ResponseVersionMajor3 = 25, ResponseVersionPeriod = 26, ResponseVersionMinor1 = 27, ResponseVersionMinor2 = 28, ResponseVersionMinor3 = 29, ResponseVersionSpace = 30, ResponseStatusCode1 = 31, ResponseStatusCode2 = 32, ResponseStatusCode3 = 33, ResponseStatusCodeSpace = 34, ResponseStatus1 = 35, ResponseStatus2 = 36, InitialEnd = 37, InitialLf = 38, CheckHeaderName = 39, FirstHeaderName = 40, UpperHeaderName = 41, LowerHeaderName = 42, StripHeaderValue = 43, HeaderValue = 44, HeaderQuotedValue = 45, HeaderEscapedValue = 46, HeaderCr1 = 47, HeaderLf1 = 48, HeaderCr2 = 49, HeaderLf2 = 50, HeaderEnd = 51, ChunkLength1 = 52, ChunkLength2 = 53, ChunkLength3 = 54, ChunkLength4 = 55, ChunkLength5 = 56, ChunkLength6 = 57, ChunkLength7 = 58, ChunkLength8 = 59, ChunkLengthCr = 60, StripChunkExtensionName = 61, UpperChunkExtensionName = 62, LowerChunkExtensionName = 63, StripChunkExtensionValue = 64, ChunkExtensionValue = 65, ChunkExtensionQuotedValue = 66, ChunkExtensionEscapedValue = 67, ChunkExtensionFinished = 68, ChunkExtensionsFinished = 69, ChunkLengthLf = 70, ChunkData = 71, ChunkDataCr = 72, ChunkDataLf = 73, MultipartHyphen1 = 74, MultipartHyphen2 = 75, MultipartBoundary = 76, MultipartDetectData = 77, MultipartDataByByte = 78, MultipartDataByLength = 79, MultipartDataByLengthCr = 80, MultipartDataByLengthLf = 81, MultipartDataByByteLf = 82, MultipartBoundaryCr = 83, MultipartBoundaryLf = 84, MultipartEnd = 85, FirstUrlEncodedName = 86, UrlEncodedName = 87, UrlEncodedNameHex1 = 88, UrlEncodedNameHex2 = 89, UrlEncodedNamePlus = 90, UrlEncodedValue = 91, UrlEncodedValueHex1 = 92, UrlEncodedValueHex2 = 93, UrlEncodedValuePlus = 94, BodyFinished = 95, Finished = 96,
}
Expand description

Parser states.

Variants§

§

Dead = 0

An error was returned from a call to Parser::parse().

§

StripDetect = 1

Stripping linear white space before request/response detection.

§

Detect1 = 2

Detect request/response byte 1.

§

Detect2 = 3

Detect request/response byte 2.

§

Detect3 = 4

Detect request/response byte 3.

§

Detect4 = 5

Detect request/response byte 4.

§

Detect5 = 6

Detect request/response byte 5.

§

RequestMethod = 7

Parsing request method.

§

RequestUrl1 = 8

Parsing request URL byte 1.

§

RequestUrl2 = 9

Parsing request URL byte 2+.

§

RequestHttp1 = 10

Parsing request HTTP version byte 1.

§

RequestHttp2 = 11

Parsing request HTTP version byte 2.

§

RequestHttp3 = 12

Parsing request HTTP version byte 3.

§

RequestHttp4 = 13

Parsing request HTTP version byte 4.

§

RequestHttp5 = 14

Parsing request HTTP version byte 5.

§

RequestVersionMajor1 = 15

Parsing request HTTP major version byte 1.

§

RequestVersionMajor2 = 16

Parsing request HTTP major version byte 2.

§

RequestVersionMajor3 = 17

Parsing request HTTP major version byte 3.

§

RequestVersionPeriod = 18

Parsing period between HTTP major and minor versions.

§

RequestVersionMinor1 = 19

Parsing request HTTP minor version byte 1.

§

RequestVersionMinor2 = 20

Parsing request HTTP minor version byte 2.

§

RequestVersionMinor3 = 21

Parsing request HTTP minor version byte 3.

§

RequestVersionCr = 22

Parsing carriage return after request HTTP minor version.

§

ResponseVersionMajor1 = 23

Parsing response HTTP major version byte 1.

§

ResponseVersionMajor2 = 24

Parsing response HTTP major version byte 2.

§

ResponseVersionMajor3 = 25

Parsing response HTTP major version byte 3.

§

ResponseVersionPeriod = 26

Parsing period between HTTP major and minor versions.

§

ResponseVersionMinor1 = 27

Parsing response HTTP minor version byte 1.

§

ResponseVersionMinor2 = 28

Parsing response HTTP minor version byte 2.

§

ResponseVersionMinor3 = 29

Parsing response HTTP minor version byte 3.

§

ResponseVersionSpace = 30

Parsing space after response HTTP minor version.

§

ResponseStatusCode1 = 31

Parsing response status code byte 1.

§

ResponseStatusCode2 = 32

Parsing response status code byte 2.

§

ResponseStatusCode3 = 33

Parsing response status code byte 3.

§

ResponseStatusCodeSpace = 34

Parsing space after response status code.

§

ResponseStatus1 = 35

Parsing response status byte 1.

§

ResponseStatus2 = 36

Parsing response status byte 2+.

§

InitialEnd = 37

Parsing initial request/response line has finished.

§

InitialLf = 38

Parsing line feed after initial request/response line.

§

CheckHeaderName = 39

Checking header name to see if it starts with a space or tab (multiline value).

§

FirstHeaderName = 40

Parsing first byte of header name.

§

UpperHeaderName = 41

Parsing upper-cased header name.

§

LowerHeaderName = 42

Parsing lower-cased header name.

§

StripHeaderValue = 43

Stripping linear white space before header value.

§

HeaderValue = 44

Parsing header value.

§

HeaderQuotedValue = 45

Parsing quoted header value.

§

HeaderEscapedValue = 46

Parsing escaped header value.

§

HeaderCr1 = 47

Parsing first carriage return after status line or header value.

§

HeaderLf1 = 48

Parsing first line feed after status line or header value.

§

HeaderCr2 = 49

Parsing second carriage return after status line or header value.

§

HeaderLf2 = 50

Parsing second line feed after status line or header value.

§

HeaderEnd = 51

Processing end-of-header flag checks.

§

ChunkLength1 = 52

Parsing chunk length byte 1.

§

ChunkLength2 = 53

Parsing chunk length byte 2.

§

ChunkLength3 = 54

Parsing chunk length byte 3.

§

ChunkLength4 = 55

Parsing chunk length byte 4.

§

ChunkLength5 = 56

Parsing chunk length byte 5.

§

ChunkLength6 = 57

Parsing chunk length byte 6.

§

ChunkLength7 = 58

Parsing chunk length byte 7.

§

ChunkLength8 = 59

Parsing chunk length byte 8.

§

ChunkLengthCr = 60

Parsing chunk length carriage return or semi-colon.

§

StripChunkExtensionName = 61

Stripping linear white space before chunk extension name.

§

UpperChunkExtensionName = 62

Parsing upper-cased chunk extension.

§

LowerChunkExtensionName = 63

Parsing lower-cased chunk extension.

§

StripChunkExtensionValue = 64

Stripping linear white space before chunk extension value.

§

ChunkExtensionValue = 65

Parsing chunk extension value.

§

ChunkExtensionQuotedValue = 66

Parsing quoted chunk extension value.

§

ChunkExtensionEscapedValue = 67

Parsing escaped chunk extension value.

§

ChunkExtensionFinished = 68

End of chunk extension.

§

ChunkExtensionsFinished = 69

End of all chunk extensions.

§

ChunkLengthLf = 70

Parsing line feed after chunk length.

§

ChunkData = 71

Parsing chunk data.

§

ChunkDataCr = 72

Parsing carriage return after chunk data.

§

ChunkDataLf = 73

Parsing line feed after chunk data.

§

MultipartHyphen1 = 74

Parsing pre boundary hyphen 1.

§

MultipartHyphen2 = 75

Parsing pre boundary hyphen 2.

§

MultipartBoundary = 76

Parsing multipart boundary.

§

MultipartDetectData = 77

Detecting multipart data parsing mechanism.

§

MultipartDataByByte = 78

Parsing multipart data by byte.

§

MultipartDataByLength = 79

Parsing multipart data by content length.

§

MultipartDataByLengthCr = 80

Parsing carriage return after data by length.

§

MultipartDataByLengthLf = 81

Parsing line feed after data by length.

§

MultipartDataByByteLf = 82

Parsing potential line feed after data by byte.

§

MultipartBoundaryCr = 83

Parsing post boundary carriage return or hyphen.

§

MultipartBoundaryLf = 84

Parsing post boundary line feed.

§

MultipartEnd = 85

Parsing last boundary second hyphen that indicates end of multipart body.

§

FirstUrlEncodedName = 86

Parsing first byte of URL encoded name.

§

UrlEncodedName = 87

Parsing URL encoded name.

§

UrlEncodedNameHex1 = 88

Parsing URL encoded name hex sequence byte 1.

§

UrlEncodedNameHex2 = 89

Parsing URL encoded name hex sequence byte 2.

§

UrlEncodedNamePlus = 90

Parsing URL encoded name plus sign.

§

UrlEncodedValue = 91

Parsing URL encoded value.

§

UrlEncodedValueHex1 = 92

Parsing URL encoded value hex sequence byte 1.

§

UrlEncodedValueHex2 = 93

Parsing URL encoded value hex sequence byte 2.

§

UrlEncodedValuePlus = 94

Parsing URL encoded value plus sign.

§

BodyFinished = 95

End of body parsing.

§

Finished = 96

Parsing entire message has finished.

Trait Implementations§

Source§

impl Clone for ParserState

Source§

fn clone(&self) -> ParserState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ParserState

Source§

impl Debug for ParserState

Source§

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

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

impl PartialEq for ParserState

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ParserState

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.