pub struct HandlerOutput {
pub decision: Decision,
pub labels: HashMap<String, String>,
pub tags: Vec<String>,
}
Expand description
A HandlerOutput
represents a decision and associated output for a handler function within a detection.
This struct contains a Decision
value that determines whether the request should be accepted or
restricted. A full explanation of decisions can be
found in the main Bulwark documentation.
Fields§
§decision: Decision
The decision
value represents the numerical decision from a detection.
It will typically be combined with similar decision values from other detections into a new combined decision value.
labels: HashMap<String, String>
The labels
field contains key/value pairs used to enrich the request with additional information.
Labels are key-value pairs that are also associated with the request, but other plugins are the primary audience for labels. Bulwark uses a label schema to reduce the need for plugin authors to do out-of-band coordination of terminology in order to interoperate.
The tags
value represents the new tags to annotate the request with.
Tags are arbitrary string values and are typically used to categorize requests and provide contextual information about why a plugin made the decision that it did. Humans are the primary audience for tags.
Trait Implementations§
Source§impl Clone for HandlerOutput
impl Clone for HandlerOutput
Source§fn clone(&self) -> HandlerOutput
fn clone(&self) -> HandlerOutput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more