rama-http 0.3.0-rc1

rama http layers, services and other utilities
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::FromPartsStateRefPair;
use crate::{Method, request::Parts};
use std::convert::Infallible;

impl<State> FromPartsStateRefPair<State> for Method
where
    State: Send + Sync,
{
    type Rejection = Infallible;

    async fn from_parts_state_ref_pair(
        parts: &Parts,
        _state: &State,
    ) -> Result<Self, Self::Rejection> {
        Ok(parts.method.clone())
    }
}