Skip to content
Merged
Changes from all commits
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
23 changes: 15 additions & 8 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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)]
pub enum LogLevel {
Trace = 0,
Debug = 1,
Expand All @@ -30,14 +30,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 @@ -49,14 +51,16 @@ pub enum Status {
}

#[repr(u32)]
#[derive(Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[non_exhaustive]
pub enum ContextType {
HttpContext = 0,
StreamContext = 1,
}

#[repr(u32)]
#[derive(Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
#[non_exhaustive]
pub enum BufferType {
HttpRequestBody = 0,
HttpResponseBody = 1,
Expand All @@ -67,7 +71,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 @@ -80,15 +85,17 @@ pub enum MapType {
}

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

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