Skip to main content

Destination

Trait Destination 

Source
pub trait Destination: Write + Sealed {
    // Required methods
    fn can_patch(&self) -> bool;
    fn position(&mut self, relative: u64) -> Result<(), Error>;
}
Expand description

Shared destination wrappers; media and raster routes use the same origin rules. Writer access derived by wrapping an actual writer in Forward or SeekBack. Sealed so callers cannot invent seek support independently of the writer.

Required Methods§

Source

fn can_patch(&self) -> bool

Whether this destination can overwrite relative output positions.

Source

fn position(&mut self, relative: u64) -> Result<(), Error>

Seek relative to the output origin; fails for a forward-only writer.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<W> Destination for Forward<W>
where W: Write,

Source§

impl<W> Destination for SeekBack<W>
where W: Write + Seek,