CommandAnalyzer

Struct CommandAnalyzer 

Source
pub struct CommandAnalyzer { /* private fields */ }
Expand description

Comprehensive analyzer that orchestrates all analysis sub-modules

Implementations§

Source§

impl CommandAnalyzer

Source

pub fn new() -> Self

Source

pub fn analyze_project( &mut self, project_path: &str, ) -> Result<Vec<CommandInfo>, Box<dyn Error>>

Analyze a complete project for Tauri commands and types

Source

pub fn analyze_project_with_verbose( &mut self, project_path: &str, verbose: bool, ) -> Result<Vec<CommandInfo>, Box<dyn Error>>

Analyze a complete project for Tauri commands and types with verbose output

Source

pub fn analyze_file( &mut self, file_path: &Path, ) -> Result<Vec<CommandInfo>, Box<dyn Error>>

Analyze a single file for Tauri commands (backward compatibility for tests)

Source

pub fn extract_type_names( &self, rust_type: &str, type_names: &mut HashSet<String>, )

Extract type names from a Rust type string

Source

pub fn get_discovered_structs(&self) -> &HashMap<String, StructInfo>

Get discovered structs

Source

pub fn get_discovered_events(&self) -> &[EventInfo]

Get discovered events

Source

pub fn get_all_discovered_channels( &self, commands: &[CommandInfo], ) -> Vec<ChannelInfo>

Get all discovered channels from all commands

Source

pub fn get_dependency_graph(&self) -> &TypeDependencyGraph

Get the dependency graph for visualization

Source

pub fn topological_sort_types(&self, types: &HashSet<String>) -> Vec<String>

Sort types topologically to ensure dependencies are declared before being used

Source

pub fn visualize_dependencies(&self, commands: &[CommandInfo]) -> String

Generate a text-based visualization of the dependency graph

Source

pub fn generate_dot_graph(&self, commands: &[CommandInfo]) -> String

Generate a DOT graph visualization of the dependency graph

Source

pub fn map_rust_type_to_typescript(&mut self, rust_type: &str) -> String

Map a Rust type to its TypeScript equivalent

Trait Implementations§

Source§

impl Default for CommandAnalyzer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.