docs: clarify which error is returned by Response::mime()

This commit is contained in:
DarkCat09 2024-08-08 16:37:28 +04:00
parent b150a71cc5
commit 03420c8e8d
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3

View file

@ -67,7 +67,8 @@ impl Response {
}
/// Get the response body MIME type by parsing the metadata field.
/// If you call this method on a non-2x response, you'll get a parse error.
/// If you call this method on a non-2x response, you'll get a parse error
/// ([`LibError::InvalidMime`]).
/// It's strongly recommended to check the status code first
/// (most handy is [`Response::is_ok()`]).
pub fn mime(&self) -> Result<mime::Mime, LibError> {