pub struct RouteCompiler { /* private fields */ }
Expand description
Route compiler with optimization and validation
Implementations§
Source§impl RouteCompiler
impl RouteCompiler
Sourcepub fn with_config(config: CompilerConfig) -> Self
pub fn with_config(config: CompilerConfig) -> Self
Create a new route compiler with custom configuration
Sourcepub fn add_route(
&mut self,
route: CompilableRoute,
) -> Result<(), CompilationError>
pub fn add_route( &mut self, route: CompilableRoute, ) -> Result<(), CompilationError>
Add a route to be compiled
Sourcepub fn add_routes(
&mut self,
routes: Vec<CompilableRoute>,
) -> Result<(), CompilationError>
pub fn add_routes( &mut self, routes: Vec<CompilableRoute>, ) -> Result<(), CompilationError>
Add multiple routes
Sourcepub fn compile(self) -> Result<CompilationResult, CompilationError>
pub fn compile(self) -> Result<CompilationResult, CompilationError>
Compile all routes into optimized structures
Trait Implementations§
Source§impl Debug for RouteCompiler
impl Debug for RouteCompiler
Auto Trait Implementations§
impl Freeze for RouteCompiler
impl RefUnwindSafe for RouteCompiler
impl Send for RouteCompiler
impl Sync for RouteCompiler
impl Unpin for RouteCompiler
impl UnwindSafe for RouteCompiler
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