pub struct RequestComponents {
pub resource_identity: ResourceIdentity,
pub url: Url,
pub method: Method,
pub headers: HeaderMap,
}
Expand description
Provides the necessary components for building a request.
Fields§
§resource_identity: ResourceIdentity
§url: Url
§method: Method
§headers: HeaderMap
Implementations§
Source§impl RequestComponents
impl RequestComponents
pub fn new( resource_identity: ResourceIdentity, url: Url, method: Method, ) -> RequestComponents
pub fn query<T: Serialize + ?Sized>(&mut self, query: &T) -> GraphResult<()>
Trait Implementations§
Source§impl AsMut<HeaderMap> for RequestComponents
impl AsMut<HeaderMap> for RequestComponents
Source§impl AsMut<Url> for RequestComponents
impl AsMut<Url> for RequestComponents
Source§impl AsRef<Url> for RequestComponents
impl AsRef<Url> for RequestComponents
Source§impl Clone for RequestComponents
impl Clone for RequestComponents
Source§fn clone(&self) -> RequestComponents
fn clone(&self) -> RequestComponents
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RequestComponents
impl Debug for RequestComponents
Source§impl Default for RequestComponents
impl Default for RequestComponents
Source§impl TryFrom<(ResourceIdentity, Method, Result<Url, GraphFailure>)> for RequestComponents
impl TryFrom<(ResourceIdentity, Method, Result<Url, GraphFailure>)> for RequestComponents
Source§type Error = GraphFailure
type Error = GraphFailure
The type returned in the event of a conversion error.
Source§fn try_from(
value: (ResourceIdentity, Method, GraphResult<Url>),
) -> Result<Self, Self::Error>
fn try_from( value: (ResourceIdentity, Method, GraphResult<Url>), ) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for RequestComponents
impl RefUnwindSafe for RequestComponents
impl Send for RequestComponents
impl Sync for RequestComponents
impl Unpin for RequestComponents
impl UnwindSafe for RequestComponents
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more