pub enum AudioData<'a> {
C2S {
id: u16,
codec: CodecType,
data: &'a [u8],
},
C2SWhisper {
id: u16,
codec: CodecType,
channels: Vec<u64>,
clients: Vec<u16>,
data: &'a [u8],
},
C2SWhisperNew {
id: u16,
codec: CodecType,
whisper_type: u8,
target: u8,
target_id: u64,
data: &'a [u8],
},
S2C {
id: u16,
from: u16,
codec: CodecType,
data: &'a [u8],
},
S2CWhisper {
id: u16,
from: u16,
codec: CodecType,
data: &'a [u8],
},
}Variants§
Implementations§
Source§impl<'a> AudioData<'a>
impl<'a> AudioData<'a>
pub fn parse( p_type: PacketType, newprotocol: bool, dir: Direction, content: &'a [u8], ) -> Result<Self, Error>
pub fn direction(&self) -> Direction
pub fn packet_type(&self) -> PacketType
pub fn codec(&self) -> CodecType
pub fn id(&self) -> u16
pub fn flags(&self) -> Flags
pub fn data(&self) -> &[u8] ⓘ
Trait Implementations§
impl<'a> Eq for AudioData<'a>
impl<'a> StructuralPartialEq for AudioData<'a>
Auto Trait Implementations§
impl<'a> Freeze for AudioData<'a>
impl<'a> RefUnwindSafe for AudioData<'a>
impl<'a> Send for AudioData<'a>
impl<'a> Sync for AudioData<'a>
impl<'a> Unpin for AudioData<'a>
impl<'a> UnwindSafe for AudioData<'a>
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