#[non_exhaustive]pub struct LoopbackEndpoint {
pub extension: String,
pub context: Option<String>,
pub dialplan: Option<String>,
pub variables: Option<Variables>,
}Expand description
Internal loopback endpoint: loopback/{extension}[/{context}[/{dialplan}]].
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.extension: StringExtension number or pattern.
context: Option<String>Dialplan context. None omits the context segment, letting
FreeSWITCH use its default.
dialplan: Option<String>Dialplan for the re-entered leg. None omits the segment, letting
FreeSWITCH use its default.
variables: Option<Variables>Per-channel variables prepended as {key=value}.
Implementations§
Source§impl LoopbackEndpoint
impl LoopbackEndpoint
Sourcepub fn new(extension: impl Into<String>) -> Self
pub fn new(extension: impl Into<String>) -> Self
Create a new loopback endpoint with no explicit context.
Sourcepub fn with_context(self, context: impl Into<String>) -> Self
pub fn with_context(self, context: impl Into<String>) -> Self
Set the dialplan context.
Sourcepub fn with_dialplan(self, dialplan: impl Into<String>) -> Self
pub fn with_dialplan(self, dialplan: impl Into<String>) -> Self
Set the dialplan. It is the third positional segment, so rendering one
without a context emits [DEFAULT_CONTEXT] in the gap.
Source§impl LoopbackEndpoint
impl LoopbackEndpoint
Sourcepub fn with_variables(self, variables: Variables) -> Self
pub fn with_variables(self, variables: Variables) -> Self
Set per-channel variables.
Trait Implementations§
Source§impl Clone for LoopbackEndpoint
impl Clone for LoopbackEndpoint
Source§fn clone(&self) -> LoopbackEndpoint
fn clone(&self) -> LoopbackEndpoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LoopbackEndpoint
impl Debug for LoopbackEndpoint
Source§impl<'de> Deserialize<'de> for LoopbackEndpoint
impl<'de> Deserialize<'de> for LoopbackEndpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl DialString for LoopbackEndpoint
impl DialString for LoopbackEndpoint
Source§impl Display for LoopbackEndpoint
impl Display for LoopbackEndpoint
impl Eq for LoopbackEndpoint
Source§impl From<LoopbackEndpoint> for Endpoint
impl From<LoopbackEndpoint> for Endpoint
Source§fn from(ep: LoopbackEndpoint) -> Self
fn from(ep: LoopbackEndpoint) -> Self
Converts to this type from the input type.
Source§impl FromStr for LoopbackEndpoint
impl FromStr for LoopbackEndpoint
Source§impl PartialEq for LoopbackEndpoint
impl PartialEq for LoopbackEndpoint
Source§impl Serialize for LoopbackEndpoint
impl Serialize for LoopbackEndpoint
impl StructuralPartialEq for LoopbackEndpoint
Auto Trait Implementations§
impl Freeze for LoopbackEndpoint
impl RefUnwindSafe for LoopbackEndpoint
impl Send for LoopbackEndpoint
impl Sync for LoopbackEndpoint
impl Unpin for LoopbackEndpoint
impl UnsafeUnpin for LoopbackEndpoint
impl UnwindSafe for LoopbackEndpoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.