pub struct OAuthHttpResponse {
pub status: u16,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
}Expand description
Transport-neutral OAuth protocol HTTP response.
Fields§
§status: u16Numeric HTTP status code.
headers: Vec<(String, String)>Response headers. Repeated fields are retained as separate entries.
body: Vec<u8>Complete response body.
Implementations§
Source§impl OAuthHttpResponse
impl OAuthHttpResponse
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Return whether the response status is in the 2xx range.
Sourcepub fn header_values<'a>(
&'a self,
name: &'a str,
) -> impl Iterator<Item = &'a str> + 'a
pub fn header_values<'a>( &'a self, name: &'a str, ) -> impl Iterator<Item = &'a str> + 'a
Iterate over values for a case-insensitive header name.
Trait Implementations§
Source§impl Clone for OAuthHttpResponse
impl Clone for OAuthHttpResponse
Source§fn clone(&self) -> OAuthHttpResponse
fn clone(&self) -> OAuthHttpResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OAuthHttpResponse
impl RefUnwindSafe for OAuthHttpResponse
impl Send for OAuthHttpResponse
impl Sync for OAuthHttpResponse
impl Unpin for OAuthHttpResponse
impl UnsafeUnpin for OAuthHttpResponse
impl UnwindSafe for OAuthHttpResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more