murgamu 0.7.4

A NestJS-inspired web framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::core::error::MurError;
use crate::mur_http::request::MurRequestContext;
use std::future::Future;
use std::pin::Pin;

pub trait MurExtractor: Sized + Send {
	type Error: Into<MurError>;

	fn extract(
		ctx: &MurRequestContext,
	) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + '_>>;
}

pub trait MurExtractorSync: Sized + Send {
	type Error: Into<MurError>;

	fn extract_sync(ctx: &MurRequestContext) -> Result<Self, Self::Error>;
}