#[non_exhaustive]pub struct ScriptRouteView {
pub index: usize,
pub source_file: String,
pub display_name: String,
}Expand description
Minimal display info for a Rhai middleware script route.
§Why fields are intentionally minimal
A Rhai middleware can run arbitrary logic to decide whether to match. Static analysis of “what URLs does this script handle” isn’t feasible without parsing Rhai (and would be unreliable even then). The view reports only what we do know statically — file path and display label — and leaves any deeper inspection to a hypothetical future editor feature.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.index: usizeIndex within service.middlewares_file_paths.
source_file: StringSource file path as recorded in service.middlewares.
display_name: StringHuman-readable label (typically the file’s basename).
Trait Implementations§
Source§impl Clone for ScriptRouteView
impl Clone for ScriptRouteView
Source§fn clone(&self) -> ScriptRouteView
fn clone(&self) -> ScriptRouteView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScriptRouteView
impl Debug for ScriptRouteView
Auto Trait Implementations§
impl Freeze for ScriptRouteView
impl RefUnwindSafe for ScriptRouteView
impl Send for ScriptRouteView
impl Sync for ScriptRouteView
impl Unpin for ScriptRouteView
impl UnsafeUnpin for ScriptRouteView
impl UnwindSafe for ScriptRouteView
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