Trait lofty::io::FileLike

source ·
pub trait FileLike:
    Read
    + Write
    + Seek
    + Truncate
    + Length
where <Self as Truncate>::Error: Into<LoftyError>, <Self as Length>::Error: Into<LoftyError>,
{ }
Expand description

Provides a set of methods to read and write to a file-like object

This is a combination of the Read, Write, Seek, Truncate, and Length traits. It is used to provide implementors access to any file saving methods such as AudioFile::save_to.

Take great care in implementing this for downstream types, as Lofty will assume that the trait implementations are correct. If this assumption were to be broken, files may become corrupted.

Implementors§

source§

impl<T> FileLike for T