fix macro pin_handler visibility
This commit is contained in:
parent
febaf3073b
commit
066bb286d4
@ -42,14 +42,13 @@ pub async fn handler_connection<S: HttpServer + Send + 'static>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[macro_export]
|
||||||
macro_rules! pin_handler {
|
macro_rules! pin_handler {
|
||||||
($handler: expr) => {
|
($handler: expr) => {
|
||||||
Box::new(move |a, b| Box::pin($handler(a, b)))
|
Box::new(move |a, b| Box::pin($handler(a, b)))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) use pin_handler;
|
|
||||||
|
|
||||||
#[cfg(feature = "http_rrs")]
|
#[cfg(feature = "http_rrs")]
|
||||||
/// HTTP_RRS handler
|
/// HTTP_RRS handler
|
||||||
pub async fn handler_http_rrs<S: HttpServer + Send + 'static>(
|
pub async fn handler_http_rrs<S: HttpServer + Send + 'static>(
|
||||||
|
@ -28,7 +28,6 @@ pub use starter::*;
|
|||||||
pub use handler::*;
|
pub use handler::*;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async fn read_line(data: &mut (impl AsyncReadExt + Unpin)) -> Result<String, HttpError> {
|
async fn read_line(data: &mut (impl AsyncReadExt + Unpin)) -> Result<String, HttpError> {
|
||||||
let mut line = Vec::new();
|
let mut line = Vec::new();
|
||||||
loop {
|
loop {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
use tokio::task::JoinHandle;
|
use tokio::task::JoinHandle;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
handler_connection, pin_handler, start_server_new_thread, start_server_sync, start_server_with_threadpool, Handler, HttpServer
|
handler_connection, start_server_new_thread, start_server_sync, start_server_with_threadpool, Handler, HttpServer
|
||||||
};
|
};
|
||||||
|
use crate::pin_handler;
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
error::Error, sync::{
|
error::Error, sync::{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user