pub fn edit_personal_dictionary(
paths: &RuntimePaths,
previous: Option<&PersonalDictionaryEntry>,
replacement: Option<&PersonalDictionaryEntry>,
request_id: &str,
) -> Result<()>Expand description
Add (previous = None), remove (replacement = None) or replace, in one attached transaction with its receipt. previous must still be user-inserted with the same weight. A request id (1..=128 of [A-Za-z0-9_-]) makes a retry of the same edit a no-op and a reuse for different content a failure.
An empty request id edits without a receipt, as the reference allowed.
自己取独占的维护租约(DictionaryAccess::try_maintenance):还有会话或别的维护持着租约时以 Busy(DICTIONARY_MAINTENANCE_BUSY)失败,什么也不写。不合法的改动在取租约之前就报出来。代次里没有 msime-pinyin.db(方案集合不读它)时只能编辑英文词,规则同 edit_personal_dictionary_with。