pub fn map<TNewBody, TMapper>(self, mut mapper: TMapper) -> Request<TNewBody>
    where
        TMapper: FnMut(TBody) -> TNewBody,
    {
        Request {
            body: mapper(self.body),
            headers: self.headers,
            method: self.method,
            uri: self.uri,
            version: self.version,
        }
    }
/// Maps the body of this request to a new type using the provided function.
///
/// # Examples
///
/// ```
/// use rtsp::method::Method;
/// use rtsp::request::Request;
/// use rtsp::uri::request::URI;
///
/// let mut request = Request::<()>::builder()
///     .with_method(Method::Setup)
///     .with_uri(URI::asterisk())
///     .with_body("")
///     .build()
///     .unwrap();
/// let request = request.map(|_| 0);
/// assert_eq!(request.body(), &0);
/// ```
Maps the body of this request to a new type using the provided function.
Maps the body of this request to a new type using the provided function .
pub fn map<TNewBody, TMapper>(self, mut mapper: TMapper) -> Request<TNewBody>
    where
        TMapper: FnMut(TBody) -> TNewBody,
    {
        Request {
            body: mapper(self.body),
            headers: self.headers,
            method: self.method,
            uri: self.uri,
            version: self.version,
        }
    }
pub fn map < TNewBody , TMapper > ( self , mut mapper : TMapper ) -> Request < TNewBody > where TMapper : FnMut ( TBody ) -> TNewBody , { Request { body : mapper ( self . body ) , headers : self . headers , method : self . method , uri : self . uri , version : self . version , } }
Maps the body of this request to a new type using the provided function.
Maps the body of this request to a new type using the provided function .
self
mapper
TMapper
self
mapper
TMapper
examples
```
use rtsp::method::Method;
use rtsp::request::Request;
use rtsp::uri::request::URI.

let mut request = Request::<()>::builder()
.with_method(Method::Setup)
.with_uri(URI::asterisk())
.with_body("")
.build()
.unwrap();
let request = request.map(|_| 0);
assert_eq!(request.body(), &0);
```
` ` ` use rtsp :: method :: Method ; use rtsp :: request :: Request ; use rtsp :: uri :: request :: URI . let mut request = Request :: < () > :: builder () . with_method ( Method :: Setup ) . with_uri ( URI :: asterisk () ) . with_body ( " " ) . build () . unwrap () ; let request = request . map ( |_| 0 ) ; assert_eq! ( request . body () &0 ) ; ` ` `