#Tauri ## 事象 以下のエラーが発生。 ``` the name `__cmd__search_messages` is defined multiple times E0255 `__cmd__search_messages` reimported here Note: `__cmd__search_messages` must be defined only once in the macro namespace of this module Help: you can use `as` to change the binding name of the import ``` 事象が発生するコード例。 ```rust #[tauri::command] pub async fn search_messages(query: String) -> Result<slack::search_messages::Messages, String> { command::search_messages::exec(query) .await .map_err(|e| e.to_string()) } ``` ## 原因 該当の関数がpublicになっていた。 ## 対策 `pub`を削除。 ```rust #[tauri::command] async fn search_messages(query: String) -> Result<slack::search_messages::Messages, String> { command::search_messages::exec(query) .await .map_err(|e| e.to_string()) } ``` ## 参考 - [\[bug\] \`\_\_cmd\_\_perform\_request\` is defined multiple times · Issue \#3198 · tauri\-apps/tauri](https://github.com/tauri-apps/tauri/issues/3198)