1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-08-02 21:28:31 +00:00
continuwuity/src/router/mod.rs

30 lines
687 B
Rust
Raw Normal View History

mod layers;
mod request;
mod router;
mod run;
mod serve;
extern crate conduit_core as conduit;
use std::{future::Future, pin::Pin, sync::Arc};
use conduit::{Result, Server};
conduit::mod_ctor! {}
conduit::mod_dtor! {}
#[no_mangle]
pub extern "Rust" fn start(server: &Arc<Server>) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> {
Box::pin(run::start(server.clone()))
}
#[no_mangle]
pub extern "Rust" fn stop(server: &Arc<Server>) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> {
Box::pin(run::stop(server.clone()))
}
#[no_mangle]
pub extern "Rust" fn run(server: &Arc<Server>) -> Pin<Box<dyn Future<Output = Result<()>> + Send>> {
Box::pin(run::run(server.clone()))
}