freeswitch_types/variables/
mod.rs1mod conference;
5mod core;
6mod core_media;
7mod esl_array;
8#[cfg(feature = "esl")]
9mod esl_headers;
10mod loopback;
11mod sip_multipart;
12mod sip_passthrough;
13mod sofia;
14
15pub use self::core::{ChannelVariable, ParseChannelVariableError};
16pub use conference::{ConferenceVariable, ParseConferenceVariableError};
17pub use core_media::{CoreMediaVariable, ParseCoreMediaVariableError, RtpStatUnit};
18pub use esl_array::{EslArray, EslArrayError, MAX_ARRAY_ITEMS};
19#[cfg(feature = "esl")]
20pub use esl_headers::EslHeaders;
21pub use loopback::{
22 LoopbackHangupCause, LoopbackResignation, LoopbackVariable, ParseLoopbackHangupCauseError,
23 ParseLoopbackVariableError,
24};
25pub use sip_multipart::{MultipartBody, MultipartItem};
26pub use sip_passthrough::{
27 InvalidHeaderName, ParseSipPassthroughError, SipHeaderPrefix, SipPassthroughHeader,
28};
29pub use sofia::{ParseSofiaVariableError, SofiaVariable};
30
31pub trait VariableName {
38 fn as_str(&self) -> &str;
40}
41
42impl VariableName for ChannelVariable {
43 fn as_str(&self) -> &str {
44 ChannelVariable::as_str(self)
45 }
46}
47
48impl VariableName for SofiaVariable {
49 fn as_str(&self) -> &str {
50 SofiaVariable::as_str(self)
51 }
52}
53
54impl VariableName for CoreMediaVariable {
55 fn as_str(&self) -> &str {
56 CoreMediaVariable::as_str(self)
57 }
58}
59
60impl VariableName for LoopbackVariable {
61 fn as_str(&self) -> &str {
62 LoopbackVariable::as_str(self)
63 }
64}
65
66impl VariableName for ConferenceVariable {
67 fn as_str(&self) -> &str {
68 ConferenceVariable::as_str(self)
69 }
70}