pub enum Message {
Logon {
seq: u32,
username: Option<String>,
password: Option<String>,
auth_token: Option<String>,
channels: Option<Vec<String>>,
},
SendTextMessage {
seq: u32,
channel: String,
for_user: Option<String>,
text: String,
},
StartStream {
seq: u32,
channel: String,
for_user: Option<String>,
codec: String,
codec_header: Option<String>,
packet_duration: u32,
},
StopStream {
seq: u32,
stream_id: u32,
},
}Expand description
Messages that can be sent to Zello
Variants§
Logon
Logon request
Fields
SendTextMessage
Send text message
StartStream
Start outgoing audio stream
Fields
StopStream
Stop outgoing audio stream
Implementations§
Source§impl Message
impl Message
Sourcepub fn logon_password(
seq: u32,
username: String,
password: String,
auth_token: String,
channel: String,
) -> Self
pub fn logon_password( seq: u32, username: String, password: String, auth_token: String, channel: String, ) -> Self
Create a logon message with username/password/token
Sourcepub fn logon_token(seq: u32, auth_token: String, channel: String) -> Self
pub fn logon_token(seq: u32, auth_token: String, channel: String) -> Self
Create a logon message with token only
Sourcepub fn send_text_for_callsign(
seq: u32,
channel: String,
text: String,
for_user: String,
) -> Self
pub fn send_text_for_callsign( seq: u32, channel: String, text: String, for_user: String, ) -> Self
Create a text message for a specific callsign
Sourcepub fn start_stream(
seq: u32,
channel: String,
codec: String,
packet_duration: u32,
) -> Self
pub fn start_stream( seq: u32, channel: String, codec: String, packet_duration: u32, ) -> Self
Create a start stream message
Sourcepub fn stop_stream(seq: u32, stream_id: u32) -> Self
pub fn stop_stream(seq: u32, stream_id: u32) -> Self
Create a stop stream message
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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