Added [derive(Debug)] to various public-facing structs.

This commit is contained in:
thelearnerofcode 2017-10-02 17:25:24 -04:00
parent 06643a441c
commit 58c8421a53

View File

@ -201,6 +201,7 @@ macro_rules! enc_ctl {
} }
/// An Opus encoder with associated state. /// An Opus encoder with associated state.
#[derive(Debug)]
pub struct Encoder { pub struct Encoder {
ptr: *mut ffi::OpusEncoder, ptr: *mut ffi::OpusEncoder,
channels: Channels, channels: Channels,
@ -362,6 +363,7 @@ macro_rules! dec_ctl {
} }
/// An Opus decoder with associated state. /// An Opus decoder with associated state.
#[derive(Debug)]
pub struct Decoder { pub struct Decoder {
ptr: *mut ffi::OpusDecoder, ptr: *mut ffi::OpusDecoder,
channels: Channels, channels: Channels,
@ -575,6 +577,7 @@ pub mod packet {
} }
/// A parsed Opus packet, retuned from `parse`. /// A parsed Opus packet, retuned from `parse`.
#[derive(Debug)]
pub struct Packet<'a> { pub struct Packet<'a> {
/// The TOC byte of the packet. /// The TOC byte of the packet.
pub toc: u8, pub toc: u8,
@ -606,6 +609,7 @@ pub mod packet {
// Float Soft Clipping // Float Soft Clipping
/// Soft-clipping to bring a float signal within the [-1,1] range. /// Soft-clipping to bring a float signal within the [-1,1] range.
#[derive(Debug)]
pub struct SoftClip { pub struct SoftClip {
channels: Channels, channels: Channels,
memory: [f32; 2], memory: [f32; 2],
@ -631,6 +635,7 @@ impl SoftClip {
// Repacketizer // Repacketizer
/// A repacketizer used to merge together or split apart multiple Opus packets. /// A repacketizer used to merge together or split apart multiple Opus packets.
#[derive(Debug)]
pub struct Repacketizer { pub struct Repacketizer {
ptr: *mut ffi::OpusRepacketizer, ptr: *mut ffi::OpusRepacketizer,
} }
@ -675,6 +680,7 @@ impl Drop for Repacketizer {
// but a real Vec<&'buf [u8]> rather than unsafe blocks may be substituted. // but a real Vec<&'buf [u8]> rather than unsafe blocks may be substituted.
/// An in-progress repacketization. /// An in-progress repacketization.
#[derive(Debug)]
pub struct RepacketizerState<'rp, 'buf> { pub struct RepacketizerState<'rp, 'buf> {
rp: &'rp mut Repacketizer, rp: &'rp mut Repacketizer,
phantom: PhantomData<&'buf [u8]>, phantom: PhantomData<&'buf [u8]>,