pub struct ProxyState {
pub config: Arc<ProxyConfig>,
pub middlewares: Arc<Vec<Box<dyn ProxyMiddleware>>>,
pub client: Client,
pub cost_recorder: Option<Arc<dyn CostRecorder>>,
/* private fields */
}Expand description
Shared state for the proxy server.
Fields§
§config: Arc<ProxyConfig>Proxy configuration.
middlewares: Arc<Vec<Box<dyn ProxyMiddleware>>>Registered middleware chain.
client: ClientReusable HTTP client for upstream forwarding.
cost_recorder: Option<Arc<dyn CostRecorder>>Optional cost recorder for post-response billing.
Trait Implementations§
Source§impl Clone for ProxyState
impl Clone for ProxyState
Source§fn clone(&self) -> ProxyState
fn clone(&self) -> ProxyState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ProxyState
impl !UnwindSafe for ProxyState
impl Freeze for ProxyState
impl Send for ProxyState
impl Sync for ProxyState
impl Unpin for ProxyState
impl UnsafeUnpin for ProxyState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more