pub struct AppState {
pub config: Config,
pub stt: Arc<SttClient>,
pub tts: Arc<TtsClient>,
pub brain: Brain,
pub twilio: Arc<TwilioClient>,
pub call_registry: CallRegistry,
pub hold_music: Option<Arc<Vec<u8>>>,
pub call_metas: Arc<Mutex<HashMap<String, CallMeta>>>,
}Expand description
Shared application state accessible from all handlers.
Fields§
§config: Config§stt: Arc<SttClient>§tts: Arc<TtsClient>§brain: Brain§twilio: Arc<TwilioClient>§call_registry: CallRegistry§hold_music: Option<Arc<Vec<u8>>>Pre-converted mu-law hold music data, if configured.
call_metas: Arc<Mutex<HashMap<String, CallMeta>>>Metadata for outbound calls, keyed by call_sid. Consumed on first utterance so the LLM knows why it called.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe 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