From 8a7e533feda8d4103e91bec890c8d10322142275 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 13 Jan 2020 20:13:08 +0100 Subject: [PATCH] Update ruma_api! documentation --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index b387b826..25cdaae9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,6 +126,10 @@ use serde_urlencoded; /// each struct can be marked with this attribute. It is an error to have a newtype body field and /// normal body fields within the same struct. /// +/// There is another kind of newtype body that is enabled with `#[ruma_api(raw_body)]`. It is used +/// for endpoints in which the request or response body can be arbitrary bytes instead of a JSON +/// objects. A field with `#[ruma_api(raw_body)]` needs to have the type `Vec`. +/// /// # Examples /// /// ```