mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-08 22:08:47 +08:00
Add import support
This commit is contained in:
@@ -4,6 +4,10 @@ use anyhow::Result;
|
||||
pub trait ScriptBuilder {
|
||||
fn default_encoding(&self) -> Encoding;
|
||||
|
||||
fn default_patched_encoding(&self) -> Encoding {
|
||||
self.default_encoding()
|
||||
}
|
||||
|
||||
fn build_script(
|
||||
&self,
|
||||
filename: &str,
|
||||
@@ -20,4 +24,11 @@ pub trait Script: std::fmt::Debug {
|
||||
fn default_output_script_type(&self) -> OutputScriptType;
|
||||
|
||||
fn extract_messages(&self) -> Result<Vec<Message>>;
|
||||
|
||||
fn import_messages(
|
||||
&self,
|
||||
messages: Vec<Message>,
|
||||
filename: &str,
|
||||
encoding: Encoding,
|
||||
) -> Result<()>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user