Skip to main content

tool_transform

Attribute Macro tool_transform 

Source
#[tool_transform]
Expand description

Parameter transformation attribute (used internally by #[tool] macro)

This attribute is automatically processed by the #[tool] macro. It should not be used directly by users - instead use the #[tool(...)] syntax on parameters.

ยงExample (internal usage)

#[tool]
impl MyTools {
    pub fn create_user(
        &self,
        #[tool_transform = "value.to_lowercase()")]
        email: String,
    ) -> Result<String, Error> {
        // ...
    }
}