Skip to main content

Module source

Module source 

Source
Expand description

Input abstraction. A container never opens a file — it asks a Source what it can do, and the ladder (see crate::ladder) supplies the best rung.

Re-exports§

pub use limit::Counting;
pub use limit::CountingWriter;
pub use limit::DEFAULT_MAX_RATIO;
pub use limit::RATIO_FLOOR;
pub use limit::RatioGuard;
pub use spill::SpillPolicy;
pub use spill::SpillSource;
pub use stream_only::StreamOnly;

Modules§

limit
Decompression-bomb protection.
spill
Rung 3 of the ladder: spool a non-seekable input so it becomes seekable.
stream_only
Adapter presenting a plain reader as a non-seekable Source.

Structs§

FileSource
A seekable source backed by a real file. The Exact rung.
PeekSource
Wraps a source so a bounded prefix can be inspected and then replayed.
ReaderSource
A forward-only source. Models “arrived on a pipe” — it erases any seek ability the underlying reader might happen to have, so tests can exercise the non-seekable path deterministically.
SourceCaps

Traits§

SeekRead
Blanket-implemented marker so &mut dyn SeekRead is usable as a trait object.
Source
An input stream that reports its own capabilities.