freeswitch_types/variables/
mod.rs1mod core;
5mod core_media;
6mod esl_array;
7#[cfg(feature = "esl")]
8mod esl_headers;
9mod sip_multipart;
10mod sip_passthrough;
11mod sofia;
12
13pub use self::core::{ChannelVariable, ParseChannelVariableError};
14pub use core_media::{CoreMediaVariable, ParseCoreMediaVariableError, RtpStatUnit};
15pub use esl_array::{EslArray, EslArrayError, MAX_ARRAY_ITEMS};
16#[cfg(feature = "esl")]
17pub use esl_headers::EslHeaders;
18pub use sip_multipart::{MultipartBody, MultipartItem};
19pub use sip_passthrough::{
20 InvalidHeaderName, ParseSipPassthroughError, SipHeaderPrefix, SipPassthroughHeader,
21};
22pub use sofia::{ParseSofiaVariableError, SofiaVariable};
23
24pub trait VariableName {
31 fn as_str(&self) -> &str;
33}
34
35impl VariableName for ChannelVariable {
36 fn as_str(&self) -> &str {
37 ChannelVariable::as_str(self)
38 }
39}
40
41impl VariableName for SofiaVariable {
42 fn as_str(&self) -> &str {
43 SofiaVariable::as_str(self)
44 }
45}
46
47impl VariableName for CoreMediaVariable {
48 fn as_str(&self) -> &str {
49 CoreMediaVariable::as_str(self)
50 }
51}