docs: clarify which error is returned by Response::mime()
This commit is contained in:
parent
b150a71cc5
commit
03420c8e8d
1 changed files with 2 additions and 1 deletions
|
@ -67,7 +67,8 @@ impl Response {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the response body MIME type by parsing the metadata field.
|
/// 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
|
/// It's strongly recommended to check the status code first
|
||||||
/// (most handy is [`Response::is_ok()`]).
|
/// (most handy is [`Response::is_ok()`]).
|
||||||
pub fn mime(&self) -> Result<mime::Mime, LibError> {
|
pub fn mime(&self) -> Result<mime::Mime, LibError> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue