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

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

30 lines
666 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<()>>>> {
Box::pin(run::start(server.clone()))
}
#[no_mangle]
pub extern "Rust" fn stop(server: &Arc<Server>) -> Pin<Box<dyn Future<Output = Result<()>>>> {
Box::pin(run::stop(server.clone()))
}
#[no_mangle]
pub extern "Rust" fn run(server: &Arc<Server>) -> Pin<Box<dyn Future<Output = Result<()>>>> {
Box::pin(run::run(server.clone()))
}