pub fn map<TNewBody, TMapper>(self, mut mapper: TMapper) -> Response<TNewBody>
    where
        TMapper: FnMut(TBody) -> TNewBody,
    {
        Response {
            body: mapper(self.body),
            headers: self.headers,
            reason_phrase: self.reason_phrase,
            status_code: self.status_code,
            version: self.version,
        }
    }
/// Maps the body of this response to a new type `T` using the provided function.
///
/// # Examples
///
/// ```
/// use rtsp::response::Response;
///
/// let mut response = Response::<()>::builder()
///     .with_body("")
///     .build()
///     .unwrap();
/// let response = response.map(|_| 0);
/// assert_eq!(response.body(), &0);
/// ```
Maps the body of this response to a new type `T` using the provided function.
Maps the body of this response to a new type ` T ` using the provided function .
pub fn map<TNewBody, TMapper>(self, mut mapper: TMapper) -> Response<TNewBody>
    where
        TMapper: FnMut(TBody) -> TNewBody,
    {
        Response {
            body: mapper(self.body),
            headers: self.headers,
            reason_phrase: self.reason_phrase,
            status_code: self.status_code,
            version: self.version,
        }
    }
pub fn map < TNewBody , TMapper > ( self , mut mapper : TMapper ) -> Response < TNewBody > where TMapper : FnMut ( TBody ) -> TNewBody , { Response { body : mapper ( self . body ) , headers : self . headers , reason_phrase : self . reason_phrase , status_code : self . status_code , version : self . version , } }
Maps the body of this response to a new type `T` using the provided function.
Maps the body of this response to a new type ` T ` using the provided function .
self
mapper
TMapper
self
mapper
TMapper
examples
```
use rtsp::response::Response.

let mut response = Response::<()>::builder()
.with_body("")
.build()
.unwrap();
let response = response.map(|_| 0);
assert_eq!(response.body(), &0);
```
` ` ` use rtsp :: response :: Response . let mut response = Response :: < () > :: builder () . with_body ( " " ) . build () . unwrap () ; let response = response . map ( |_| 0 ) ; assert_eq! ( response . body () &0 ) ; ` ` `