Skip to main content

inspectable

Attribute Macro inspectable 

Source
#[inspectable]
Expand description

Marks a #[tauri::command] as inspectable by Victauri.

Generates a companion <fn_name>__schema() function that returns a victauri_core::CommandInfo with the command’s name, description, argument types, return type, and NL-resolution metadata. Call the schema function at setup time to register the command in the Victauri CommandRegistry.

§Example

#[tauri::command]
#[inspectable(description = "Save API key for a provider")]
async fn save_api_key(provider: String, key: String) -> Result<(), String> {
    // ...
}

// At setup:
state.registry.register(save_api_key__schema());