pub struct RouteRegistry { /* private fields */ }Expand description
Deterministic routing registry for built-ins and plugins.
Implementations§
Source§impl RouteRegistry
impl RouteRegistry
Sourcepub fn register_plugin_namespace(
&mut self,
raw_namespace: &str,
) -> Result<(), RouteError>
pub fn register_plugin_namespace( &mut self, raw_namespace: &str, ) -> Result<(), RouteError>
Register a plugin namespace with deterministic rejection rules.
Sourcepub fn register_plugin_namespace_with_aliases(
&mut self,
raw_namespace: &str,
raw_aliases: &[String],
) -> Result<(), RouteError>
pub fn register_plugin_namespace_with_aliases( &mut self, raw_namespace: &str, raw_aliases: &[String], ) -> Result<(), RouteError>
Register a plugin namespace together with routed top-level aliases.
Sourcepub fn resolve(
&self,
normalized_path: &[String],
) -> Result<RouteTarget, RouteError>
pub fn resolve( &self, normalized_path: &[String], ) -> Result<RouteTarget, RouteError>
Resolve normalized command path to a route target.
Sourcepub fn suggest_namespace(&self, raw: &str) -> Option<String>
pub fn suggest_namespace(&self, raw: &str) -> Option<String>
Suggest nearest namespace for unknown routes.
Sourcepub fn route_tree(&self) -> Vec<NamespaceMetadata>
pub fn route_tree(&self) -> Vec<NamespaceMetadata>
Build route-tree introspection payload.
Sourcepub fn render_command_tree(&self) -> String
pub fn render_command_tree(&self) -> String
Render namespace tree lines for snapshot testing and diagnostics.
Sourcepub fn built_in_paths(&self) -> Vec<CommandPath>
pub fn built_in_paths(&self) -> Vec<CommandPath>
Render built-in route paths for introspection.
Sourcepub fn alias_rewrites(&self) -> Vec<(CommandPath, CommandPath)>
pub fn alias_rewrites(&self) -> Vec<(CommandPath, CommandPath)>
Render alias route rewrites for diagnostics introspection.
Sourcepub fn plugin_alias_rewrites(&self) -> Vec<(CommandPath, CommandPath)>
pub fn plugin_alias_rewrites(&self) -> Vec<(CommandPath, CommandPath)>
Render plugin alias rewrites for diagnostics introspection.
Trait Implementations§
Source§impl Clone for RouteRegistry
impl Clone for RouteRegistry
Source§fn clone(&self) -> RouteRegistry
fn clone(&self) -> RouteRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RouteRegistry
impl Debug for RouteRegistry
Auto Trait Implementations§
impl Freeze for RouteRegistry
impl RefUnwindSafe for RouteRegistry
impl Send for RouteRegistry
impl Sync for RouteRegistry
impl Unpin for RouteRegistry
impl UnsafeUnpin for RouteRegistry
impl UnwindSafe for RouteRegistry
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