pub struct AppState {
pub sessions: Arc<SessionManager>,
pub client: Arc<Client>,
pub queue_delegate: Option<Arc<dyn QueueDelegate>>,
pub reverse_channel: Option<ReverseChannel>,
}Expand description
Shared state every axum handler reaches via State<AppState>.
Fields§
§sessions: Arc<SessionManager>§client: Arc<Client>§queue_delegate: Option<Arc<dyn QueueDelegate>>Optional in-process queue-read delegate. Some when an
embedder (the API) plugged one in at setup time;
None for the CLI’s standalone proxy — tool calls then
never invoke the delegate seam.
reverse_channel: Option<ReverseChannel>Optional reverse channel for ws:// upstreams. Some when an
embedder (the API) hands the proxy its request’s reverse-attach
WS at setup time; None for the standalone proxy, which then
serves HTTP upstreams only (a ws:// upstream errors at connect).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more