pub struct CallCenterServer { /* private fields */ }
Expand description
A complete call center server that manages engine lifecycle and provides APIs
Implementations§
Source§impl CallCenterServer
impl CallCenterServer
Sourcepub async fn new(
config: CallCenterConfig,
db_path: Option<String>,
) -> Result<Self>
pub async fn new( config: CallCenterConfig, db_path: Option<String>, ) -> Result<Self>
Create a new CallCenterServer with the given configuration and database path
Sourcepub async fn new_in_memory(config: CallCenterConfig) -> Result<Self>
pub async fn new_in_memory(config: CallCenterConfig) -> Result<Self>
Create a new CallCenterServer with an in-memory database
Sourcepub fn supervisor_api(&self) -> &SupervisorApi
pub fn supervisor_api(&self) -> &SupervisorApi
Get a reference to the supervisor API
Sourcepub fn engine(&self) -> &Arc<CallCenterEngine>
pub fn engine(&self) -> &Arc<CallCenterEngine>
Get a reference to the engine (for advanced usage)
Sourcepub fn create_client(&self, agent_id: String) -> CallCenterClient
pub fn create_client(&self, agent_id: String) -> CallCenterClient
Create a new client API for agent applications
Sourcepub async fn create_test_agents(
&self,
agents: Vec<(&str, &str, &str)>,
) -> Result<()>
pub async fn create_test_agents( &self, agents: Vec<(&str, &str, &str)>, ) -> Result<()>
Helper to create test agents (for examples/testing)
Sourcepub async fn create_default_queues(&self) -> Result<()>
pub async fn create_default_queues(&self) -> Result<()>
Helper to create default queues (for examples/testing)
Auto Trait Implementations§
impl Freeze for CallCenterServer
impl !RefUnwindSafe for CallCenterServer
impl Send for CallCenterServer
impl Sync for CallCenterServer
impl Unpin for CallCenterServer
impl !UnwindSafe for CallCenterServer
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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