pub struct SoundPacket {
pub encoder_type: EncoderType,
pub sample_rate: u32,
pub channels: u32,
pub bytes: Vec<u8>,
pub samples_per_frame: u64,
}
Expand description
The encoded sound packet. Contains useful information about the encoded packet.
Fields§
§encoder_type: EncoderType
The Encoder’s type which this SoundPacket
got encoded with.
sample_rate: u32
The sample rate of the encoded packet.
channels: u32
The channel count of the encoded packet.
bytes: Vec<u8>
The bytes of the encoded sound packet.
samples_per_frame: u64
The count of samples per frame.
Trait Implementations§
Source§impl Debug for SoundPacket
impl Debug for SoundPacket
Source§impl DeepSizeOf for SoundPacket
impl DeepSizeOf for SoundPacket
Source§fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of_children(&self, context: &mut Context) -> usize
Returns an estimation of the heap-managed storage of this object.
This does not include the size of the object itself. Read more
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
Returns an estimation of a total size of memory owned by the
object, including heap-managed storage. Read more
Source§impl<'de> Deserialize<'de> for SoundPacket
impl<'de> Deserialize<'de> for SoundPacket
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 SoundPacket
impl RefUnwindSafe for SoundPacket
impl Send for SoundPacket
impl Sync for SoundPacket
impl Unpin for SoundPacket
impl UnwindSafe for SoundPacket
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more