Archive

Trait Archive 

Source
pub trait Archive {
    // Required methods
    fn new_file<'a>(
        &'a mut self,
        name: &str,
        size: Option<u64>,
    ) -> Result<Box<dyn WriteSeek + 'a>>;
    fn write_header(&mut self) -> Result<()>;

    // Provided method
    fn new_file_non_seek<'a>(
        &'a mut self,
        name: &str,
        size: Option<u64>,
    ) -> Result<Box<dyn Write + 'a>> { ... }
}
Expand description

A trait for creating archives.

Required Methods§

Source

fn new_file<'a>( &'a mut self, name: &str, size: Option<u64>, ) -> Result<Box<dyn WriteSeek + 'a>>

Creates a new file in the archive.

size is optional, if provided, size must be exactly the size of the file to be created.

Source

fn write_header(&mut self) -> Result<()>

Writes the header of the archive. (Must be called after writing all files.)

Provided Methods§

Source

fn new_file_non_seek<'a>( &'a mut self, name: &str, size: Option<u64>, ) -> Result<Box<dyn Write + 'a>>

Creates a new file in the archive that does not require seeking.

size is optional, if provided, size must be exactly the size of the file to be created.

Implementors§

Source§

impl<T: Write + Seek + Sync + Send + 'static> Archive for Xp3ArchiveWriter<T>

Available on crate features kirikiri-arc and kirikiri only.
Source§

impl<T: Write + Seek + Read> Archive for ArtemisPf2Writer<T>

Available on crate features artemis-arc and artemis only.
Source§

impl<T: Write + Seek + Read> Archive for ArtemisArcWriter<T>

Available on crate features artemis-arc and artemis only.
Source§

impl<T: Write + Seek> Archive for msg_tool::scripts::bgi::archive::v1::BgiArchiveWriter<T>

Available on crate features bgi-arc and bgi only.
Source§

impl<T: Write + Seek> Archive for msg_tool::scripts::bgi::archive::v2::BgiArchiveWriter<T>

Available on crate features bgi-arc and bgi only.
Source§

impl<T: Write + Seek> Archive for PckArchiveWriter<T>

Available on crate features circus-arc and circus only.
Source§

impl<T: Write + Seek> Archive for EscudeBinArchiveWriter<T>

Available on crate features escude-arc and escude only.
Source§

impl<T: Write + Seek> Archive for PazArcWriter<T>

Available on crate features musica-arc and musica only.
Source§

impl<T: Write + Seek> Archive for ItufuruArchiveWriter<T>

Available on crate features yaneurao-itufuru and yaneurao only.