Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ pub type NewStreamContext = fn(context_id: u32, root_context_id: u32) -> Box<dyn
pub type NewHttpContext = fn(context_id: u32, root_context_id: u32) -> Box<dyn HttpContext>;

#[repr(u32)]
#[derive(Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[non_exhaustive]
Comment thread
PiotrSikora marked this conversation as resolved.
Outdated
pub enum LogLevel {
Trace = 0,
Debug = 1,
Expand All @@ -30,14 +31,16 @@ pub enum LogLevel {
}

#[repr(u32)]
#[derive(Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[non_exhaustive]
pub enum Action {
Continue = 0,
Pause = 1,
}

#[repr(u32)]
#[derive(Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[non_exhaustive]
pub enum Status {
Ok = 0,
NotFound = 1,
Expand All @@ -48,7 +51,8 @@ pub enum Status {
}

#[repr(u32)]
#[derive(Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[non_exhaustive]
pub enum BufferType {
HttpRequestBody = 0,
HttpResponseBody = 1,
Expand All @@ -58,7 +62,8 @@ pub enum BufferType {
}

#[repr(u32)]
#[derive(Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[non_exhaustive]
pub enum MapType {
HttpRequestHeaders = 0,
HttpRequestTrailers = 1,
Expand All @@ -69,7 +74,8 @@ pub enum MapType {
}

#[repr(u32)]
#[derive(Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[non_exhaustive]
pub enum PeerType {
Unknown = 0,
Local = 1,
Expand Down