Files
continuwuity/src/router/mod.rs
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
687 B
Rust
Raw Normal View History

2024-05-30 22:38:39 +00:00
mod layers;
mod request;
mod router;
mod run;
mod serve;
2024-04-29 17:41:15 -07:00
2024-05-09 15:59:08 -07:00
extern crate conduit_core as conduit;
2024-04-29 17:41:15 -07:00
2024-05-09 15:59:08 -07:00
use std::{future::Future, pin::Pin, sync::Arc};
2024-04-29 17:41:15 -07:00
2024-05-09 15:59:08 -07:00
use conduit::{Result, Server};
2024-04-29 17:41:15 -07:00
2024-05-09 15:59:08 -07:00
conduit::mod_ctor! {}
conduit::mod_dtor! {}
2024-04-29 17:41:15 -07:00
2024-05-09 15:59:08 -07:00
#[no_mangle]
2024-06-09 06:10:21 +00:00
pub extern "Rust" fn start(server: &Arc<Server>) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> {
2024-05-09 15:59:08 -07:00
Box::pin(run::start(server.clone()))
2024-04-29 17:41:15 -07:00
}
2024-05-09 15:59:08 -07:00
#[no_mangle]
2024-06-09 06:10:21 +00:00
pub extern "Rust" fn stop(server: &Arc<Server>) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> {
2024-05-09 15:59:08 -07:00
Box::pin(run::stop(server.clone()))
2024-04-29 17:41:15 -07:00
}
2024-05-09 15:59:08 -07:00
#[no_mangle]
2024-06-09 06:10:21 +00:00
pub extern "Rust" fn run(server: &Arc<Server>) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> {
2024-05-09 15:59:08 -07:00
Box::pin(run::run(server.clone()))
2024-04-29 17:41:15 -07:00
}