1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-30 10:42:55 +01:00

update optional extractor impl docs

This commit is contained in:
Rob Ede 2022-04-23 21:02:24 +01:00
parent 45592b37b6
commit 017e40f733
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933

View File

@ -80,9 +80,9 @@ pub trait FromRequest: Sized {
}
}
/// Optionally extract a field from the request
/// Optionally extract from the request.
///
/// If the FromRequest for T fails, return None rather than returning an error response
/// If the inner `T::from_request` returns an error, handler will receive `None` instead.
///
/// # Examples
/// ```
@ -167,9 +167,10 @@ where
}
}
/// Optionally extract a field from the request or extract the Error if unsuccessful
/// Extract from the request, passing error type through to handler.
///
/// If the `FromRequest` for T fails, inject Err into handler rather than returning an error response
/// If the inner `T::from_request` returns an error, allow handler to receive the error rather than
/// immediately returning an error response.
///
/// # Examples
/// ```