make item enums non_exhaustive

This commit is contained in:
Scott Lamb 2022-04-26 14:53:33 -07:00
parent 1646142322
commit 7ea09dde3c
3 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,8 @@
`retina::PacketContext`. Both must be printed to provide the same `retina::PacketContext`. Both must be printed to provide the same
information as before. This change reduces how much data needs to be copied information as before. This change reduces how much data needs to be copied
with each packet. with each packet.
* BREAKING: `PacketItem` and `CodecItem` are now `#[non_exhaustive]` for
future expansion.
## `v0.3.9` (2022-04-12) ## `v0.3.9` (2022-04-12)

View File

@ -1796,6 +1796,7 @@ async fn punch_firewall_hole(
/// An item yielded by [`Session<Playing>`]'s [`futures::stream::Stream`] impl. /// An item yielded by [`Session<Playing>`]'s [`futures::stream::Stream`] impl.
#[derive(Debug)] #[derive(Debug)]
#[non_exhaustive]
pub enum PacketItem { pub enum PacketItem {
RtpPacket(rtp::Packet), RtpPacket(rtp::Packet),
SenderReport(rtp::SenderReport), SenderReport(rtp::SenderReport),

View File

@ -26,6 +26,7 @@ pub(crate) mod simple_audio;
/// An item yielded from [`crate::client::Demuxed`]'s [`futures::stream::Stream`] impl. /// An item yielded from [`crate::client::Demuxed`]'s [`futures::stream::Stream`] impl.
#[derive(Debug)] #[derive(Debug)]
#[non_exhaustive]
pub enum CodecItem { pub enum CodecItem {
VideoFrame(VideoFrame), VideoFrame(VideoFrame),
AudioFrame(AudioFrame), AudioFrame(AudioFrame),