Enum VoicePacket

Source
pub enum VoicePacket<Dst: VoicePacketDst> {
    Ping {
        timestamp: u64,
    },
    Audio {
        _dst: PhantomData<Dst>,
        target: u8,
        session_id: Dst::SessionId,
        seq_num: u64,
        payload: VoicePacketPayload,
        position_info: Option<Bytes>,
    },
}
Expand description

A packet transmitted via Mumble’s voice channel.

Variants§

§

Ping

Ping packets contain opaque timestamp-like values which should simply be echoed back.

Fields

§timestamp: u64

Opaque timestamp-like value. Unless this is the echo, no assumptions about it should be made.

§

Audio

Packet containing audio data.

Fields

§_dst: PhantomData<Dst>

Destination. Required due to encoding differences depending on packet flow direction.

§target: u8

The target.

Only values 0-31 are valid (when serialized, this field is 5-bits long).

§session_id: Dst::SessionId

Session ID. Absent when packet is Serverbound.

§seq_num: u64

Sequence number of the first audio frame in this packet.

Packets may contain multiple frames, so this may increase by more than one per packet.

§payload: VoicePacketPayload

The actual audio data

§position_info: Option<Bytes>

Positional audio information.

Usually [f32; 3] but may contain additional or different data if all clients receiving this packet can deal with such values (e.g. games with builtin Mumble client may use this field to transmit additional data to other game clients).

Trait Implementations§

Source§

impl<Dst: Clone + VoicePacketDst> Clone for VoicePacket<Dst>
where Dst::SessionId: Clone,

Source§

fn clone(&self) -> VoicePacket<Dst>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Dst: Debug + VoicePacketDst> Debug for VoicePacket<Dst>
where Dst::SessionId: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<EncodeDst: VoicePacketDst, DecodeDst: VoicePacketDst> Encoder<VoicePacket<EncodeDst>> for CryptState<EncodeDst, DecodeDst>

Source§

type Error = Error

The type of encoding errors. Read more
Source§

fn encode( &mut self, item: VoicePacket<EncodeDst>, dst: &mut BytesMut, ) -> Result<(), Self::Error>

Encodes a frame into the buffer provided. Read more
Source§

impl<EncodeDst: VoicePacketDst, DecodeDst: VoicePacketDst> Encoder<VoicePacket<EncodeDst>> for VoiceCodec<EncodeDst, DecodeDst>

Source§

type Error = Error

The type of encoding errors. Read more
Source§

fn encode( &mut self, item: VoicePacket<EncodeDst>, dst: &mut BytesMut, ) -> Result<(), Self::Error>

Encodes a frame into the buffer provided. Read more
Source§

impl<Dst: VoicePacketDst> From<VoicePacket<Dst>> for ControlPacket<Dst>

Source§

fn from(inner: VoicePacket<Dst>) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<VoicePacket<Dst>> for RawControlPacket

Source§

fn from(msg: VoicePacket<Dst>) -> Self

Converts to this type from the input type.
Source§

impl<Dst: PartialEq + VoicePacketDst> PartialEq for VoicePacket<Dst>
where Dst::SessionId: PartialEq,

Source§

fn eq(&self, other: &VoicePacket<Dst>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Dst: VoicePacketDst> TryFrom<Bytes> for VoicePacket<Dst>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(bytes: Bytes) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<Dst: VoicePacketDst> TryFrom<RawControlPacket> for VoicePacket<Dst>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(packet: RawControlPacket) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<Dst: VoicePacketDst> StructuralPartialEq for VoicePacket<Dst>

Auto Trait Implementations§

§

impl<Dst> !Freeze for VoicePacket<Dst>

§

impl<Dst> RefUnwindSafe for VoicePacket<Dst>

§

impl<Dst> Send for VoicePacket<Dst>
where <Dst as VoicePacketDst>::SessionId: Send, Dst: Send,

§

impl<Dst> Sync for VoicePacket<Dst>
where <Dst as VoicePacketDst>::SessionId: Sync, Dst: Sync,

§

impl<Dst> Unpin for VoicePacket<Dst>
where <Dst as VoicePacketDst>::SessionId: Unpin, Dst: Unpin,

§

impl<Dst> UnwindSafe for VoicePacket<Dst>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.