pub trait Script: Debug + Any {
Show 30 methods
// Required methods
fn default_output_script_type(&self) -> OutputScriptType;
fn default_format_type(&self) -> FormatOptions;
// Provided methods
fn is_output_supported(&self, output: OutputScriptType) -> bool { ... }
fn custom_output_extension<'a>(&'a self) -> &'a str { ... }
fn multiple_message_files(&self) -> bool { ... }
fn extract_messages(&self) -> Result<Vec<Message>> { ... }
fn extract_multiple_messages(&self) -> Result<HashMap<String, Vec<Message>>> { ... }
fn import_messages<'a>(
&'a self,
_messages: Vec<Message>,
_file: Box<dyn WriteSeek + 'a>,
_filename: &str,
_encoding: Encoding,
_replacement: Option<&'a ReplacementTable>,
) -> Result<()> { ... }
fn import_multiple_messages<'a>(
&'a self,
_messages: HashMap<String, Vec<Message>>,
_file: Box<dyn WriteSeek + 'a>,
_filename: &str,
_encoding: Encoding,
_replacement: Option<&'a ReplacementTable>,
) -> Result<()> { ... }
fn import_messages_filename(
&self,
messages: Vec<Message>,
filename: &str,
encoding: Encoding,
replacement: Option<&ReplacementTable>,
) -> Result<()> { ... }
fn import_multiple_messages_filename(
&self,
messages: HashMap<String, Vec<Message>>,
filename: &str,
encoding: Encoding,
replacement: Option<&ReplacementTable>,
) -> Result<()> { ... }
fn custom_export(&self, _filename: &Path, _encoding: Encoding) -> Result<()> { ... }
fn custom_import<'a>(
&'a self,
_custom_filename: &'a str,
_file: Box<dyn WriteSeek + 'a>,
_encoding: Encoding,
_output_encoding: Encoding,
) -> Result<()> { ... }
fn custom_import_filename(
&self,
custom_filename: &str,
filename: &str,
encoding: Encoding,
output_encoding: Encoding,
) -> Result<()> { ... }
fn is_archive(&self) -> bool { ... }
fn iter_archive_filename<'a>(
&'a self,
) -> Result<Box<dyn Iterator<Item = Result<String>> + 'a>> { ... }
fn iter_archive_offset<'a>(
&'a self,
) -> Result<Box<dyn Iterator<Item = Result<u64>> + 'a>> { ... }
fn open_file<'a>(
&'a self,
_index: usize,
) -> Result<Box<dyn ArchiveContent + 'a>> { ... }
fn open_file_by_name<'a>(
&'a self,
name: &str,
ignore_case: bool,
) -> Result<Box<dyn ArchiveContent + 'a>> { ... }
fn open_file_by_offset<'a>(
&'a self,
offset: u64,
) -> Result<Box<dyn ArchiveContent + 'a>> { ... }
fn archive_output_ext<'a>(&'a self) -> Option<&'a str> { ... }
fn is_image(&self) -> bool { ... }
fn export_image(&self) -> Result<ImageData> { ... }
fn import_image<'a>(
&'a self,
_data: ImageData,
_file: Box<dyn WriteSeek + 'a>,
) -> Result<()> { ... }
fn import_image_filename(
&self,
data: ImageData,
filename: &str,
) -> Result<()> { ... }
fn is_multi_image(&self) -> bool { ... }
fn export_multi_image<'a>(
&'a self,
) -> Result<Box<dyn Iterator<Item = Result<ImageDataWithName>> + 'a>> { ... }
fn import_multi_image<'a>(
&'a self,
_data: Vec<ImageDataWithName>,
_file: Box<dyn WriteSeek + 'a>,
) -> Result<()> { ... }
fn import_multi_image_filename(
&self,
data: Vec<ImageDataWithName>,
filename: &str,
) -> Result<()> { ... }
fn extra_info<'a>(&'a self) -> Option<Box<dyn AnyDebug + 'a>> { ... }
}Expand description
A trait for script types.
Required Methods§
Sourcefn default_output_script_type(&self) -> OutputScriptType
fn default_output_script_type(&self) -> OutputScriptType
Returns the default output script type for this script.
Sourcefn default_format_type(&self) -> FormatOptions
fn default_format_type(&self) -> FormatOptions
Returns the default format options for this script.
Provided Methods§
Sourcefn is_output_supported(&self, output: OutputScriptType) -> bool
fn is_output_supported(&self, output: OutputScriptType) -> bool
Checks if the given output script type is supported by this script.
Sourcefn custom_output_extension<'a>(&'a self) -> &'a str
fn custom_output_extension<'a>(&'a self) -> &'a str
Returns the output extension for this script when exporting with custom output.
Sourcefn multiple_message_files(&self) -> bool
fn multiple_message_files(&self) -> bool
Returns true if this script can contains multiple message files.
Sourcefn extract_messages(&self) -> Result<Vec<Message>>
fn extract_messages(&self) -> Result<Vec<Message>>
Extract messages from this script.
Sourcefn extract_multiple_messages(&self) -> Result<HashMap<String, Vec<Message>>>
fn extract_multiple_messages(&self) -> Result<HashMap<String, Vec<Message>>>
Extract multiple messages from this script.
Sourcefn import_messages<'a>(
&'a self,
_messages: Vec<Message>,
_file: Box<dyn WriteSeek + 'a>,
_filename: &str,
_encoding: Encoding,
_replacement: Option<&'a ReplacementTable>,
) -> Result<()>
fn import_messages<'a>( &'a self, _messages: Vec<Message>, _file: Box<dyn WriteSeek + 'a>, _filename: &str, _encoding: Encoding, _replacement: Option<&'a ReplacementTable>, ) -> Result<()>
Import messages into this script.
messages- The messages to import.file- A writer with seek capabilities to write the patched scripts.filename- The path of the file to write the patched scripts.encoding- The encoding to use for the patched scripts.replacement- An optional replacement table for message replacements.
Sourcefn import_multiple_messages<'a>(
&'a self,
_messages: HashMap<String, Vec<Message>>,
_file: Box<dyn WriteSeek + 'a>,
_filename: &str,
_encoding: Encoding,
_replacement: Option<&'a ReplacementTable>,
) -> Result<()>
fn import_multiple_messages<'a>( &'a self, _messages: HashMap<String, Vec<Message>>, _file: Box<dyn WriteSeek + 'a>, _filename: &str, _encoding: Encoding, _replacement: Option<&'a ReplacementTable>, ) -> Result<()>
Import multiple messages into this script.
messages- A map of filenames to messages to import.file- A writer with seek capabilities to write the patched scripts.filename- The path of the file to write the patched scripts.encoding- The encoding to use for the patched scripts.replacement- An optional replacement table for message replacements.s
Sourcefn import_messages_filename(
&self,
messages: Vec<Message>,
filename: &str,
encoding: Encoding,
replacement: Option<&ReplacementTable>,
) -> Result<()>
fn import_messages_filename( &self, messages: Vec<Message>, filename: &str, encoding: Encoding, replacement: Option<&ReplacementTable>, ) -> Result<()>
Import messages into this script.
messages- The messages to import.filename- The path of the file to write the patched scripts.encoding- The encoding to use for the patched scripts.replacement- An optional replacement table for message replacements.
Sourcefn import_multiple_messages_filename(
&self,
messages: HashMap<String, Vec<Message>>,
filename: &str,
encoding: Encoding,
replacement: Option<&ReplacementTable>,
) -> Result<()>
fn import_multiple_messages_filename( &self, messages: HashMap<String, Vec<Message>>, filename: &str, encoding: Encoding, replacement: Option<&ReplacementTable>, ) -> Result<()>
Import multiple messages into this script.
messages- A map of filenames to messages to import.filename- The path of the file to write the patched scripts.encoding- The encoding to use for the patched scripts.replacement- An optional replacement table for message replacements.
Sourcefn custom_export(&self, _filename: &Path, _encoding: Encoding) -> Result<()>
fn custom_export(&self, _filename: &Path, _encoding: Encoding) -> Result<()>
Exports data from this script.
filename- The path of the file to write the exported data.encoding- The encoding to use for the exported data.
Sourcefn custom_import<'a>(
&'a self,
_custom_filename: &'a str,
_file: Box<dyn WriteSeek + 'a>,
_encoding: Encoding,
_output_encoding: Encoding,
) -> Result<()>
fn custom_import<'a>( &'a self, _custom_filename: &'a str, _file: Box<dyn WriteSeek + 'a>, _encoding: Encoding, _output_encoding: Encoding, ) -> Result<()>
Imports data into this script.
custom_filename- The path of the file to import.file- A writer with seek capabilities to write the patched scripts.encoding- The encoding of the patched scripts.output_encoding- The encoding to use for the imported file.
Sourcefn custom_import_filename(
&self,
custom_filename: &str,
filename: &str,
encoding: Encoding,
output_encoding: Encoding,
) -> Result<()>
fn custom_import_filename( &self, custom_filename: &str, filename: &str, encoding: Encoding, output_encoding: Encoding, ) -> Result<()>
Imports data into this script.
custom_filename- The path of the file to import.filename- The path of the file to write the patched scripts.encoding- The encoding of the patched scripts.output_encoding- The encoding to use for the imported file.
Sourcefn is_archive(&self) -> bool
fn is_archive(&self) -> bool
Returns true if this script is an archive.
Sourcefn iter_archive_filename<'a>(
&'a self,
) -> Result<Box<dyn Iterator<Item = Result<String>> + 'a>>
fn iter_archive_filename<'a>( &'a self, ) -> Result<Box<dyn Iterator<Item = Result<String>> + 'a>>
Returns an iterator over archive filenames.
Sourcefn iter_archive_offset<'a>(
&'a self,
) -> Result<Box<dyn Iterator<Item = Result<u64>> + 'a>>
fn iter_archive_offset<'a>( &'a self, ) -> Result<Box<dyn Iterator<Item = Result<u64>> + 'a>>
Returns an iterator over archive offsets.
Sourcefn open_file<'a>(
&'a self,
_index: usize,
) -> Result<Box<dyn ArchiveContent + 'a>>
fn open_file<'a>( &'a self, _index: usize, ) -> Result<Box<dyn ArchiveContent + 'a>>
Opens a file in the archive by its index.
Sourcefn open_file_by_name<'a>(
&'a self,
name: &str,
ignore_case: bool,
) -> Result<Box<dyn ArchiveContent + 'a>>
fn open_file_by_name<'a>( &'a self, name: &str, ignore_case: bool, ) -> Result<Box<dyn ArchiveContent + 'a>>
Opens a file in the archive by its name.
name- The name of the file to open.ignore_case- If true, the name comparison will be case-insensitive.
Sourcefn open_file_by_offset<'a>(
&'a self,
offset: u64,
) -> Result<Box<dyn ArchiveContent + 'a>>
fn open_file_by_offset<'a>( &'a self, offset: u64, ) -> Result<Box<dyn ArchiveContent + 'a>>
Opens a file in the archive by its offset.
Sourcefn archive_output_ext<'a>(&'a self) -> Option<&'a str>
fn archive_output_ext<'a>(&'a self) -> Option<&'a str>
Returns output extension for archive output folder.
Sourcefn is_image(&self) -> bool
Available on crate feature image only.
fn is_image(&self) -> bool
image only.Returns true if this script type is an image.
Sourcefn export_image(&self) -> Result<ImageData>
Available on crate feature image only.
fn export_image(&self) -> Result<ImageData>
image only.Exports the image data from this script.
Sourcefn import_image<'a>(
&'a self,
_data: ImageData,
_file: Box<dyn WriteSeek + 'a>,
) -> Result<()>
Available on crate feature image only.
fn import_image<'a>( &'a self, _data: ImageData, _file: Box<dyn WriteSeek + 'a>, ) -> Result<()>
image only.Imports an image into this script.
data- The image data to import.file- A writer with seek capabilities to write the patched scripts.
Sourcefn import_image_filename(&self, data: ImageData, filename: &str) -> Result<()>
Available on crate feature image only.
fn import_image_filename(&self, data: ImageData, filename: &str) -> Result<()>
image only.Imports an image into this script.
data- The image data to import.filename- The path of the file to write the patched scripts.
Sourcefn is_multi_image(&self) -> bool
Available on crate feature image only.
fn is_multi_image(&self) -> bool
image only.Returns true if this script is contains multiple images.
Sourcefn export_multi_image<'a>(
&'a self,
) -> Result<Box<dyn Iterator<Item = Result<ImageDataWithName>> + 'a>>
Available on crate feature image only.
fn export_multi_image<'a>( &'a self, ) -> Result<Box<dyn Iterator<Item = Result<ImageDataWithName>> + 'a>>
image only.Exports multiple images from this script.
Sourcefn import_multi_image<'a>(
&'a self,
_data: Vec<ImageDataWithName>,
_file: Box<dyn WriteSeek + 'a>,
) -> Result<()>
Available on crate feature image only.
fn import_multi_image<'a>( &'a self, _data: Vec<ImageDataWithName>, _file: Box<dyn WriteSeek + 'a>, ) -> Result<()>
image only.Imports multiple images into this script.
data- A vector of image data with names to import.file- A writer with seek capabilities to write the patched scripts.
Sourcefn import_multi_image_filename(
&self,
data: Vec<ImageDataWithName>,
filename: &str,
) -> Result<()>
Available on crate feature image only.
fn import_multi_image_filename( &self, data: Vec<ImageDataWithName>, filename: &str, ) -> Result<()>
image only.Imports multiple images into this script.
data- A vector of image data with names to import.filename- The path of the file to write the patched scripts.
Sourcefn extra_info<'a>(&'a self) -> Option<Box<dyn AnyDebug + 'a>>
fn extra_info<'a>(&'a self) -> Option<Box<dyn AnyDebug + 'a>>
Returns the extra information for this script.
Implementors§
impl Script for Asb
artemis only.impl Script for AstScript
artemis only.impl Script for TxtScript
artemis-panmimisoft and artemis only.impl Script for ArtemisTxtScript
artemis only.impl Script for Dsc
bgi-arc and bgi only.impl Script for BgiAudio
bgi-audio and bgi only.impl Script for BGIBpScript
bgi only.impl Script for BGIBsiScript
bgi only.impl Script for BgiCBG
bgi-img and bgi only.impl Script for BgiImage
bgi-img and bgi only.impl Script for BGIScript
bgi only.impl Script for CstScript
cat-system only.impl Script for CstlScript
cat-system only.impl Script for Hg3Image
cat-system-img and cat-system only.impl Script for Pcm
circus-audio and circus only.impl Script for CrxImage
circus-img and circus only.impl Script for CrxdImage
circus-img and circus only.impl Script for CircusMesScript
circus only.impl Script for Dref
emote-img only.impl Script for PImg
emote-img only.impl Script for Psb
emote-img only.impl Script for SrcXmlScript
entis-gls only.impl Script for EscudeBinList
escude only.impl Script for EscudeBinScript
escude only.impl Script for RldScript
ex-hibit only.impl Script for HcbScript
favorite only.impl Script for BinScript
hexen-haus only.impl Script for PngImage
hexen-haus-img and hexen-haus only.impl Script for TlgImage
kirikiri-img and kirikiri only.impl Script for KsScript
kirikiri only.impl Script for Mdf
kirikiri only.impl Script for ScnScript
kirikiri only.impl Script for SimpleCrypt
kirikiri only.impl Script for Tjs2
kirikiri only.impl Script for TjsNs0
kirikiri only.impl Script for PazArc
musica-arc and musica only.impl Script for MusicaScript
musica only.impl Script for Map
silky only.impl Script for Mes
silky only.impl Script for PgdGe
softpal-img and softpal only.impl Script for Pgd3
softpal-img and softpal only.impl Script for SoftpalScript
softpal only.impl Script for WillPlusWipImage
will-plus-img and will-plus only.impl Script for Ws2DisasmScript
will-plus only.impl Script for Ws2Script
will-plus only.impl Script for ItufuruScript
yaneurao-itufuru and yaneurao only.impl<T: Read + Seek + Debug + 'static> Script for ArtemisPf2<T>
artemis-arc and artemis only.impl<T: Read + Seek + Debug + 'static> Script for ArtemisArc<T>
artemis-arc and artemis only.impl<T: Read + Seek + Debug + 'static> Script for msg_tool::scripts::bgi::archive::v1::BgiArchive<T>
bgi-arc and bgi only.impl<T: Read + Seek + Debug + 'static> Script for msg_tool::scripts::bgi::archive::v2::BgiArchive<T>
bgi-arc and bgi only.impl<T: Read + Seek + Debug + 'static> Script for CSIntArc<T>
cat-system-arc and cat-system only.impl<T: Read + Seek + Debug + 'static> Script for CrmArchive<T>
circus-arc and circus only.impl<T: Read + Seek + Debug + 'static> Script for DatArchive<T>
circus-arc and circus only.impl<T: Read + Seek + Debug + 'static> Script for PckArchive<T>
circus-arc and circus only.impl<T: Read + Seek + Debug + 'static> Script for ExHibitGrpArchive<T>
ex-hibit-arc and ex-hibit only.impl<T: Read + Seek + Debug + 'static> Script for Xp3Archive<T>
kirikiri-arc and kirikiri only.impl<T: Read + Seek + Debug + 'static> Script for SoftpalPacArchive<T>
softpal-arc and softpal only.impl<T: Read + Seek + Debug + Any> Script for EscudeBinArchive<T>
escude-arc and escude only.impl<T: Read + Seek + Debug + Any> Script for HexenHausArccArchive<T>
hexen-haus-arc and hexen-haus only.impl<T: Read + Seek + Debug + Any> Script for HexenHausOdioArchive<T>
hexen-haus-arc and hexen-haus only.impl<T: Read + Seek + Debug + Any> Script for HexenHausWagArchive<T>
hexen-haus-arc and hexen-haus only.impl<T: Read + Seek + Debug + Any> Script for ItufuruArchive<T>
yaneurao-itufuru and yaneurao only.