pdk_classy/hl/request_data.rs
1// Copyright (c) 2025, Salesforce, Inc.,
2// All rights reserved.
3// For full license text, see the LICENSE.txt file
4
5#[allow(unused)]
6use crate::hl::Flow;
7
8/// Carries user data from Request filter to Response filter when possible and represents
9/// the three posible final statuses from a Request filter.
10/// This type is intended to be injected as a parameter in Response filters.
11#[derive(Debug, Clone)]
12pub enum RequestData<B> {
13 /// Represents that the Request filter has ended with a [`Flow::Continue`].
14 /// This variant carries the user data from Request filter.
15 Continue(B),
16
17 /// Represents that the Request filter has ended with a [`Flow::Break`].
18 Break,
19
20 /// Represents that the Request filter being cancelled
21 /// due to a flow breaking in the upstream.
22 Cancel,
23}