pub struct DictConfig {
pub dict_type: String,
pub file: Option<String>,
pub dicts: Option<Vec<DictConfig>>,
}Expand description
代表一个词典配置,可以是一个单独的词典文件,也可以是一组词典
Fields§
§dict_type: String词典的类型,例如 “text” 或 “group”
file: Option<String>词典文件名 (用于 type: "text")
dicts: Option<Vec<DictConfig>>子词典列表 (用于 type: "group")。
Trait Implementations§
Source§impl Debug for DictConfig
impl Debug for DictConfig
Source§impl<'de> Deserialize<'de> for DictConfig
impl<'de> Deserialize<'de> for DictConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DictConfig
impl RefUnwindSafe for DictConfig
impl Send for DictConfig
impl Sync for DictConfig
impl Unpin for DictConfig
impl UnwindSafe for DictConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more