Skip to main content

function_path_to_symbol

Function function_path_to_symbol 

Source
pub fn function_path_to_symbol(crate_name: &str, function_path: &str) -> String
Expand description

Convert a function path to preview export symbol.

Example:

  • sidebar with crate my-crate -> waterui_preview_my_crate_sidebar
  • dashboard::admin::card_preview with crate my-crate -> waterui_preview_my_crate_card_preview

ยงPanics

Panics if function_path does not end with a function name.