Documentation
// Copyright (c) 2026, Salesforce, Inc.,
// All rights reserved.
// For full license text, see the LICENSE.txt file

#[allow(unused)]
use crate::hl::Flow;

/// Carries user data from Request filter to Response filter when possible and represents
/// the three posible final statuses from a Request filter.
/// This type is intended to be injected as a parameter in Response filters.
#[derive(Debug, Clone)]
pub enum RequestData<B> {
    /// Represents that the Request filter has ended with a [`Flow::Continue`].
    /// This variant carries the user data from Request filter.
    Continue(B),

    /// Represents that the Request filter has ended with a [`Flow::Break`].
    Break,

    /// Represents that the Request filter being cancelled
    /// due to a flow breaking in the upstream.
    Cancel,
}