pub struct AxumParser;
Implementations§
Source§impl AxumParser
impl AxumParser
pub fn new() -> Self
pub fn extract_routes_from_router(&self, _router: &Router) -> Vec<RouteInfo>
Sourcepub fn parse_router_code(&self, code: &str) -> Vec<RouteInfo>
pub fn parse_router_code(&self, code: &str) -> Vec<RouteInfo>
Parse routes from a string representation of router code This is a simplified approach for demonstration
Sourcepub fn auto_detect_routes(&self, source_path: &str) -> Result<Vec<RouteInfo>>
pub fn auto_detect_routes(&self, source_path: &str) -> Result<Vec<RouteInfo>>
Auto-detect routes from source file
Sourcepub fn parse_router_code_with_functions(
&self,
code: &str,
) -> Result<Vec<RouteInfo>>
pub fn parse_router_code_with_functions( &self, code: &str, ) -> Result<Vec<RouteInfo>>
Enhanced parser that analyzes both router definitions and handler functions
pub fn create_route_info( &self, method: &str, path: &str, handler_info: HandlerInfo, ) -> RouteInfo
pub fn register_route( &self, method: &str, path: &str, summary: Option<&str>, description: Option<&str>, parameters: Option<Vec<Parameter>>, request_body: Option<RequestBody>, responses: Option<HashMap<String, ApiResponse>>, ) -> RouteInfo
Trait Implementations§
Source§impl Default for AxumParser
impl Default for AxumParser
Source§impl FrameworkParser for AxumParser
impl FrameworkParser for AxumParser
fn parse_routes(&self, _app: &dyn Any) -> Vec<RouteInfo>
fn extract_handler_info(&self, _handler: &dyn Any) -> HandlerInfo
Auto Trait Implementations§
impl Freeze for AxumParser
impl RefUnwindSafe for AxumParser
impl Send for AxumParser
impl Sync for AxumParser
impl Unpin for AxumParser
impl UnwindSafe for AxumParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more