0.18 primitive: FrameSource/FrameSink trait split (deprecate Stream)
Splits the bidirectional pes::Stream into one-direction traits so calling read() on a write-only sink is a compile error instead of runtime E9001. Keeps Stream alive as deprecated through 0.18 with a blanket FrameSource impl so existing concrete types compile unchanged. FrameSink can't be blanket-impl'd from Stream (different finish signature), so concrete impls migrate per-type in a follow-up. Concrete `impl pes::Stream for X` blocks in mux/* and the existing tests gain a one-line `#[allow(deprecated)]` to keep `-D warnings` clean during the deprecation window — no behavior changes. See freemkv-private/memory/0_18_redesign.md. Single contributor: MattJackson.
This commit is contained in:
@@ -159,6 +159,11 @@ pub use disc::{
|
||||
// Most consumers use the URL resolvers (`input()` / `output()`) which pick
|
||||
// the right type from a scheme:// URL. Direct construction is for callers
|
||||
// that need to wire custom readers (e.g. autorip's drive-session reuse).
|
||||
// 0.18 trait split: `FrameSource` (read-only) and `FrameSink` (write-only)
|
||||
// supersede the unified `pes::Stream`. The old `Stream` re-export below
|
||||
// stays available for the deprecation window.
|
||||
pub use pes::{FrameSink, FrameSource, PesFrame};
|
||||
|
||||
pub use mux::DiscStream;
|
||||
pub use mux::M2tsStream;
|
||||
pub use mux::MkvStream;
|
||||
|
||||
Reference in New Issue
Block a user