#[non_exhaustive]pub enum VoiceTransport {
Udp,
Tcp,
Tls,
Unknown,
}Expand description
SIP transport for a synced account line. Wire-stable snake_case;
mirrors the daemon’s TransportKind.
Builds up to 0.0.32 knew only udp / tcp and failed a whole account
page on anything else. Two things keep that from happening again:
Unknowncatches any transport a newer platform stores that this build doesn’t know, so one such line can’t fail the rest of the page. A consumer should leave that line alone, not guess a transport for it.#[non_exhaustive], so the next transport is additive for consumers thatmatchon this type.
The platform also hides transports a client didn’t ask for (see
VoiceAccountsQuery::transports), which is what protects the builds
that predate both.
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.
Udp
Tcp
Tls
SIP over TLS (RFC 3261 §26.2).
Unknown
A transport this build doesn’t know. Only ever produced by deserializing; never send it — the platform rejects it.
Implementations§
Source§impl VoiceTransport
impl VoiceTransport
Sourcepub const KNOWN: [VoiceTransport; 3]
pub const KNOWN: [VoiceTransport; 3]
Every transport this build can read and write — what
VoiceAccountsQuery::default asks the platform for.
Trait Implementations§
Source§impl Clone for VoiceTransport
impl Clone for VoiceTransport
impl Copy for VoiceTransport
Source§impl Debug for VoiceTransport
impl Debug for VoiceTransport
Source§impl<'de> Deserialize<'de> for VoiceTransport
impl<'de> Deserialize<'de> for VoiceTransport
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
impl Eq for VoiceTransport
Source§impl PartialEq for VoiceTransport
impl PartialEq for VoiceTransport
Source§impl Serialize for VoiceTransport
impl Serialize for VoiceTransport
impl StructuralPartialEq for VoiceTransport
Auto Trait Implementations§
impl Freeze for VoiceTransport
impl RefUnwindSafe for VoiceTransport
impl Send for VoiceTransport
impl Sync for VoiceTransport
impl Unpin for VoiceTransport
impl UnsafeUnpin for VoiceTransport
impl UnwindSafe for VoiceTransport
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