#[non_exhaustive]#[repr(u8)]pub enum ChannelState {
Show 14 variants
CsNew = 0,
CsInit = 1,
CsRouting = 2,
CsSoftExecute = 3,
CsExecute = 4,
CsExchangeMedia = 5,
CsPark = 6,
CsConsumeMedia = 7,
CsHibernate = 8,
CsReset = 9,
CsHangup = 10,
CsReporting = 11,
CsDestroy = 12,
CsNone = 13,
}Expand description
Channel state from switch_channel_state_t – carried in the Channel-State header
as a string (CS_ROUTING) and in Channel-State-Number as an integer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CsNew = 0
CsInit = 1
CsRouting = 2
CsSoftExecute = 3
CsExecute = 4
CsExchangeMedia = 5
CsPark = 6
CsConsumeMedia = 7
CsHibernate = 8
CsReset = 9
CsHangup = 10
CsReporting = 11
CsDestroy = 12
CsNone = 13
Implementations§
Source§impl ChannelState
impl ChannelState
Source§impl ChannelState
impl ChannelState
Source§impl ChannelState
impl ChannelState
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Whether the channel is gone: CS_DESTROY, and nothing else.
The session’s run loop exits on CS_DESTROY; CS_NONE is a
running_state sentinel the state machine aborts on if it ever reaches
it, so it ends nothing despite sorting above CS_DESTROY.
CHANNEL_STATE events carry no variable_* headers, so end-of-life
detected here cannot be paired with any channel variable from the same
event. The variable-bearing terminal event is CHANNEL_HANGUP_COMPLETE,
which is also where variable_hangup_cause first appears –
CHANNEL_HANGUP carries only the Hangup-Cause header.
Trait Implementations§
Source§impl AsRef<str> for ChannelState
impl AsRef<str> for ChannelState
Source§impl Clone for ChannelState
impl Clone for ChannelState
impl Copy for ChannelState
Source§impl Debug for ChannelState
impl Debug for ChannelState
Source§impl<'de> Deserialize<'de> for ChannelState
impl<'de> Deserialize<'de> for ChannelState
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 Display for ChannelState
impl Display for ChannelState
impl Eq for ChannelState
Source§impl FromStr for ChannelState
impl FromStr for ChannelState
Source§impl Hash for ChannelState
impl Hash for ChannelState
Source§impl Ord for ChannelState
impl Ord for ChannelState
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ChannelState
impl PartialEq for ChannelState
Source§impl PartialOrd for ChannelState
impl PartialOrd for ChannelState
Source§impl Serialize for ChannelState
impl Serialize for ChannelState
impl StructuralPartialEq for ChannelState
Auto Trait Implementations§
impl Freeze for ChannelState
impl RefUnwindSafe for ChannelState
impl Send for ChannelState
impl Sync for ChannelState
impl Unpin for ChannelState
impl UnsafeUnpin for ChannelState
impl UnwindSafe for ChannelState
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.