http_protocol/request_uri/mod.rs
1use bytes::Bytes;
2
3#[derive(Debug, Clone, Eq, PartialEq)]
4pub struct RequestUri {
5 inner: Bytes,
6}
7
8impl RequestUri {
9 pub fn new<T: Into<Bytes>>(r: T) -> Self {
10 Self { inner: r.into() }
11 }
12}
13
14impl From<Bytes> for RequestUri {
15 fn from(b: Bytes) -> Self {
16 Self { inner: b }
17 }
18}
19
20impl From<RequestUri> for Bytes {
21 fn from(r: RequestUri) -> Self {
22 r.inner
23 }
24}