mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-07-22 08:05:15 +08:00
chore: establish development baseline
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
//! AssetBundle 错误类型定义
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
/// AssetBundle 错误类型
|
||||
#[derive(Error, Debug)]
|
||||
pub enum AssetBundleError {
|
||||
/// IO 错误
|
||||
#[error("IO error: {0}")]
|
||||
Io(#[from] std::io::Error),
|
||||
|
||||
/// 解析错误
|
||||
#[error("Parse error: {0}")]
|
||||
Parse(String),
|
||||
|
||||
/// 不支持的格式
|
||||
#[error("Unsupported format: {0}")]
|
||||
UnsupportedFormat(String),
|
||||
|
||||
/// 其他错误
|
||||
#[error(transparent)]
|
||||
Other(#[from] anyhow::Error),
|
||||
}
|
||||
|
||||
/// AssetBundle Result 类型
|
||||
pub type Result<T> = std::result::Result<T, AssetBundleError>;
|
||||
@@ -0,0 +1,17 @@
|
||||
//! # BAT AssetBundle
|
||||
//!
|
||||
//! Unity AssetBundle 解析器核心
|
||||
//!
|
||||
//! 提供插件化的 AssetBundle 解析框架
|
||||
|
||||
#![warn(missing_docs)]
|
||||
#![warn(clippy::all)]
|
||||
|
||||
pub mod error;
|
||||
pub mod parser;
|
||||
pub mod types;
|
||||
|
||||
pub use error::{AssetBundleError, Result};
|
||||
|
||||
/// AssetBundle 解析器版本号
|
||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
@@ -0,0 +1,7 @@
|
||||
//! 解析器模块占位
|
||||
|
||||
/// AssetBundle 解析器接口(待实现)
|
||||
pub trait Parser {
|
||||
/// 解析器名称
|
||||
fn name(&self) -> &str;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
//! AssetBundle 类型定义占位
|
||||
|
||||
/// Asset 类型(待实现)
|
||||
pub enum AssetType {
|
||||
/// 文本资源
|
||||
TextAsset,
|
||||
}
|
||||
Reference in New Issue
Block a user