pub struct AppStateBuilder {
pub config: Option<Config>,
pub stream_engine: Option<Arc<StreamEngine>>,
pub callrecord_sender: Option<CallRecordSender>,
pub callrecord_formatter: Option<Arc<dyn CallRecordFormatter>>,
pub cancel_token: Option<CancellationToken>,
pub create_invitation_handler: Option<FnCreateInvitationHandler>,
pub config_path: Option<String>,
pub message_inspector: Option<Box<dyn MessageInspector>>,
pub target_locator: Option<Box<dyn TargetLocator>>,
pub transport_inspector: Option<Box<dyn TransportEventInspector>>,
pub refer_header_resolver: Option<Arc<dyn ReferHeaderResolver>>,
pub sip_flow: Option<Arc<SipFlow>>,
}Fields§
§config: Option<Config>§stream_engine: Option<Arc<StreamEngine>>§callrecord_sender: Option<CallRecordSender>§callrecord_formatter: Option<Arc<dyn CallRecordFormatter>>§cancel_token: Option<CancellationToken>§create_invitation_handler: Option<FnCreateInvitationHandler>§config_path: Option<String>§message_inspector: Option<Box<dyn MessageInspector>>§target_locator: Option<Box<dyn TargetLocator>>§transport_inspector: Option<Box<dyn TransportEventInspector>>§refer_header_resolver: Option<Arc<dyn ReferHeaderResolver>>§sip_flow: Option<Arc<SipFlow>>Externally created signaling recorder; when set it takes precedence
over [sipflow] config (used by embedders that need the same
SipFlow handle in their own callrecord manager).
Implementations§
Source§impl AppStateBuilder
impl AppStateBuilder
pub fn new() -> Self
pub fn with_config(self, config: Config) -> Self
pub fn with_stream_engine(self, stream_engine: Arc<StreamEngine>) -> Self
pub fn with_callrecord_sender(self, sender: CallRecordSender) -> Self
pub fn with_cancel_token(self, token: CancellationToken) -> Self
pub fn with_config_metadata(self, path: Option<String>) -> Self
pub fn with_inspector( &mut self, inspector: Box<dyn MessageInspector>, ) -> &mut Self
pub fn with_target_locator( &mut self, locator: Box<dyn TargetLocator>, ) -> &mut Self
pub fn with_transport_inspector( &mut self, inspector: Box<dyn TransportEventInspector>, ) -> &mut Self
Sourcepub fn with_refer_header_resolver(
self,
resolver: Arc<dyn ReferHeaderResolver>,
) -> Self
pub fn with_refer_header_resolver( self, resolver: Arc<dyn ReferHeaderResolver>, ) -> Self
Install a hook that rewrites the custom headers an incoming REFER carries onto the transfer INVITE. Without one the REFER headers are forwarded unchanged.
Sourcepub fn with_sipflow(self, sip_flow: Arc<SipFlow>) -> Self
pub fn with_sipflow(self, sip_flow: Arc<SipFlow>) -> Self
Inject an externally created signaling recorder (see
crate::sipflow). Takes precedence over [sipflow] config.
pub async fn build(self) -> Result<AppState>
Auto Trait Implementations§
impl !RefUnwindSafe for AppStateBuilder
impl !UnwindSafe for AppStateBuilder
impl Freeze for AppStateBuilder
impl Send for AppStateBuilder
impl Sync for AppStateBuilder
impl Unpin for AppStateBuilder
impl UnsafeUnpin for AppStateBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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