Trait ArchiveContent

Source
pub trait ArchiveContent: Read {
    // Required method
    fn name(&self) -> &str;

    // Provided methods
    fn is_script(&self) -> bool { ... }
    fn script_type(&self) -> Option<&ScriptType> { ... }
    fn data(&mut self) -> Result<Vec<u8>> { ... }
    fn to_data<'a>(&'a mut self) -> Result<Box<dyn ReadSeek + 'a>> { ... }
}
Expand description

A trait to present the file in an archive.

Required Methods§

Source

fn name(&self) -> &str

Returns the name of the file in the archive.

Provided Methods§

Source

fn is_script(&self) -> bool

Returns true if the file is a script.

Source

fn script_type(&self) -> Option<&ScriptType>

Returns the script type if the file is a script.

Source

fn data(&mut self) -> Result<Vec<u8>>

Returns the data of the file as a vector of bytes.

Source

fn to_data<'a>(&'a mut self) -> Result<Box<dyn ReadSeek + 'a>>

Returns a reader that supports reading and seeking.

Implementors§

Source§

impl ArchiveContent for msg_tool::scripts::cat_system::archive::int::MemEntry

Available on crate features cat-system-arc and cat-system only.
Source§

impl ArchiveContent for msg_tool::scripts::escude::archive::Entry

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

impl ArchiveContent for msg_tool::scripts::yaneurao::itufuru::archive::Entry

Available on crate features yaneurao-itufuru and yaneurao only.
Source§

impl<F: Fn(&[u8], usize, &str) -> Option<&'static ScriptType>> ArchiveContent for msg_tool::scripts::bgi::archive::v1::MemEntry<F>

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

impl<F: Fn(&[u8], usize, &str) -> Option<&'static ScriptType>> ArchiveContent for msg_tool::scripts::bgi::archive::v2::MemEntry<F>

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

impl<T: Read + Seek> ArchiveContent for msg_tool::scripts::artemis::archive::pfs::Entry<T>

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

impl<T: Read + Seek> ArchiveContent for msg_tool::scripts::bgi::archive::v1::Entry<T>

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

impl<T: Read + Seek> ArchiveContent for msg_tool::scripts::bgi::archive::v2::Entry<T>

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

impl<T: Read + Seek> ArchiveContent for msg_tool::scripts::cat_system::archive::int::Entry<T>

Available on crate features cat-system-arc and cat-system only.
Source§

impl<T: Read + Seek> ArchiveContent for msg_tool::scripts::circus::archive::crm::Entry<T>

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

impl<T: Read + Seek> ArchiveContent for msg_tool::scripts::circus::archive::dat::Entry<T>

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

impl<T: Read + Seek> ArchiveContent for msg_tool::scripts::circus::archive::pck::Entry<T>

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

impl<T: Read + Seek, F: Fn(&[u8], usize, &str) -> Option<&'static ScriptType>> ArchiveContent for BseReader<T, F>

Available on crate features bgi-arc and bgi only.