pub struct HttpRouteRegistry { /* private fields */ }Implementations§
Source§impl HttpRouteRegistry
impl HttpRouteRegistry
pub fn new() -> Self
pub async fn register_api_route( &self, path: String, sender: Sender<RequestEnvelope>, )
pub async fn unregister_api_route(&self, path: &str)
Sourcepub async fn register_static_mount(
&self,
mount: StaticMount,
) -> Result<(), CamelError>
pub async fn register_static_mount( &self, mount: StaticMount, ) -> Result<(), CamelError>
Register a static mount. Duplicate detection is by mount_path
only — every mount on a given port must have a unique prefix.
A single SPA mount is still the convention, but it is no longer
enforced structurally; the dispatch loop treats all mounts
uniformly (sorted by longest prefix) and uses mode to decide
whether to attempt SPA-fallback after ServeDir fails.
Sourcepub async fn unregister_static_mount(&self, mount_path: &str)
pub async fn unregister_static_mount(&self, mount_path: &str)
Unregister a static mount by its unique mount_path.
Trait Implementations§
Source§impl Clone for HttpRouteRegistry
impl Clone for HttpRouteRegistry
Source§fn clone(&self) -> HttpRouteRegistry
fn clone(&self) -> HttpRouteRegistry
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 HttpRouteRegistry
impl Debug for HttpRouteRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for HttpRouteRegistry
impl !UnwindSafe for HttpRouteRegistry
impl Freeze for HttpRouteRegistry
impl Send for HttpRouteRegistry
impl Sync for HttpRouteRegistry
impl Unpin for HttpRouteRegistry
impl UnsafeUnpin for HttpRouteRegistry
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