#[non_exhaustive]pub struct MuxFinish<T = Vec<u8>> {
pub tail: T,
pub patches: Vec<Patch>,
}Expand description
Shared completion and patch types; retained paths for media implementations. Remaining output and ordered replacements returned by a producer.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tail: TBytes not yet consumed through pending_output.
patches: Vec<Patch>Earlier bytes to overwrite; empty for a forward-only layout.
Implementations§
Source§impl<T> OutputFinish<T>
impl<T> OutputFinish<T>
Sourcepub fn new(tail: T, patches: Vec<Patch>) -> OutputFinish<T>
pub fn new(tail: T, patches: Vec<Patch>) -> OutputFinish<T>
The remaining bytes and the patches to apply after them.
Sourcepub fn validate(&self, emitted_bytes: u64) -> Result<u64, PatchError>
pub fn validate(&self, emitted_bytes: u64) -> Result<u64, PatchError>
Validate the complete finish before appending its tail or applying any patch. Offsets are relative to this output stream, not a surrounding file. Returns the final stream length, including the tail.
This checks ranges and arithmetic only. A writer must separately enforce its output allowance and whether its chosen layout permits patches. Overlapping patches apply in their listed order. Successful validation cannot make an external writer’s later I/O failures atomic.