pub struct AppStateInner {Show 19 fields
pub config: Arc<Config>,
pub token: CancellationToken,
pub stream_engine: Arc<StreamEngine>,
pub callrecord_sender: Option<CallRecordSender>,
pub endpoint: Endpoint,
pub registration_handles: Mutex<HashMap<String, CancellationToken>>,
pub alive_users: Arc<RwLock<HashSet<String>>>,
pub dialog_layer: Arc<DialogLayer>,
pub create_invitation_handler: Option<FnCreateInvitationHandler>,
pub invitation: Invitation,
pub routing_state: Arc<RoutingState>,
pub pending_playbooks: Arc<Mutex<HashMap<String, (String, Instant)>>>,
pub learned_public_address: SharedPublicAddress,
pub learned_peers: SharedLearnedPeers,
pub active_calls: Arc<Mutex<HashMap<String, ActiveCallRef>>>,
pub total_calls: AtomicU64,
pub total_failed_calls: AtomicU64,
pub uptime: DateTime<Local>,
pub shutting_down: Arc<AtomicBool>,
}Fields§
§config: Arc<Config>§token: CancellationToken§stream_engine: Arc<StreamEngine>§callrecord_sender: Option<CallRecordSender>§endpoint: Endpoint§registration_handles: Mutex<HashMap<String, CancellationToken>>§alive_users: Arc<RwLock<HashSet<String>>>§dialog_layer: Arc<DialogLayer>§create_invitation_handler: Option<FnCreateInvitationHandler>§invitation: Invitation§routing_state: Arc<RoutingState>§pending_playbooks: Arc<Mutex<HashMap<String, (String, Instant)>>>§learned_public_address: SharedPublicAddress§learned_peers: SharedLearnedPeersPeer source addresses learned from call traffic, used by the OPTIONS
ACL ([options_response]).
active_calls: Arc<Mutex<HashMap<String, ActiveCallRef>>>§total_calls: AtomicU64§total_failed_calls: AtomicU64§uptime: DateTime<Local>§shutting_down: Arc<AtomicBool>Implementations§
Source§impl AppStateInner
impl AppStateInner
pub fn auto_learn_public_address_enabled(&self) -> bool
Sourcepub fn options_source_allowed(
&self,
source_ip: Option<IpAddr>,
source_host: &str,
) -> bool
pub fn options_source_allowed( &self, source_ip: Option<IpAddr>, source_host: &str, ) -> bool
Whether an OPTIONS probe from source_ip/source_host (as extracted
from the top Via header) should be answered: the source must match the
static ACL, a registered-server host, or a peer address learned from
call traffic within the configured TTL.
pub fn get_dump_events_file(&self, session_id: &String) -> String
pub fn get_recorder_file(&self, session_id: &String) -> String
pub async fn serve(self: Arc<Self>) -> Result<()>
pub fn stop(&self)
pub async fn graceful_stop(&self, total_timeout_secs: u64) -> Result<()>
pub async fn start_registration(&self) -> Result<usize>
pub fn find_credentials_for_callee( &self, callee: &str, ) -> Option<UserCredential>
pub async fn stop_registration( &self, wait_for_clear: Option<Duration>, ) -> Result<()>
pub async fn register(&self, option: RegisterOption) -> Result<()>
Trait Implementations§
Source§impl Drop for AppStateInner
impl Drop for AppStateInner
Auto Trait Implementations§
impl !Freeze for AppStateInner
impl !RefUnwindSafe for AppStateInner
impl !UnwindSafe for AppStateInner
impl Send for AppStateInner
impl Sync for AppStateInner
impl Unpin for AppStateInner
impl UnsafeUnpin for AppStateInner
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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