[][src]Function yukikaze::extractor::json_notify

pub async fn json_notify<S, I, E, N, J>(
    body: S,
    encoding: ContentEncoding,
    limit: Option<usize>,
    notify: N
) -> Result<J, BodyReadError> where
    S: HttpBody<Data = I, Error = E> + Unpin,
    I: Into<Bytes> + Buf,
    E: Into<BodyReadError>,
    J: DeserializeOwned,
    N: Notifier

Extracts body as JSON from Stream

Params:

  • body - Stream of data chunks to read. If limit is hit, body is not exhausted completely.
  • encoding - Specifies content's encoding to use.
  • limit - Specifies limit on body size, if not specified uses default 4kb