mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-12 07:58:48 +08:00
增强脚本解析功能,支持多种脚本类型识别和处理
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::types::*;
|
||||
use anyhow::Result;
|
||||
|
||||
pub trait ScriptBuilder {
|
||||
pub trait ScriptBuilder: std::fmt::Debug {
|
||||
fn default_encoding(&self) -> Encoding;
|
||||
|
||||
fn default_patched_encoding(&self) -> Encoding {
|
||||
@@ -17,6 +17,10 @@ pub trait ScriptBuilder {
|
||||
|
||||
fn extensions(&self) -> &'static [&'static str];
|
||||
|
||||
fn is_this_format(&self, _filename: &str, _buf: &[u8], _buf_len: usize) -> Option<u8> {
|
||||
None
|
||||
}
|
||||
|
||||
fn script_type(&self) -> &'static ScriptType;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user