pub struct RequestHandler { /* private fields */ }

Implementations§

source§

impl RequestHandler

source

pub fn new( inner: Client, request_components: RequestComponents, err: Option<GraphFailure>, body: Option<BodyRead> ) -> RequestHandler

source

pub fn into_blocking(self) -> BlockingRequestHandler

source

pub fn is_err(&self) -> bool

Returns true if any errors occurred prior to sending the request.

Example
let client = Graph::new("ACCESS_TOKEN");
let request_handler = client.groups().list_group();
println!("{:#?}", request_handler.is_err());
source

pub fn err(&self) -> Option<&GraphFailure>

Returns any error wrapped in an Option that occurred prior to sending a request

Example
let client = Graph::new("ACCESS_TOKEN");
let request_handler = client.groups().list_group();
println!("{:#?}", request_handler.err());
source

pub fn url(&self) -> Url

source

pub fn query<T: Serialize + ?Sized>(self, query: &T) -> Self

source

pub fn append_query_pair<KV: AsRef<str>>(self, key: KV, value: KV) -> Self

source

pub fn extend_path<I: AsRef<str>>(self, path: &[I]) -> Self

source

pub fn header<K: Into<HeaderName>, V: Into<HeaderValue>>( self, header_name: K, header_value: V ) -> Self

Insert a header for the request.

source

pub fn headers(self, header_map: HeaderMap) -> Self

Set the headers for the request using reqwest::HeaderMap

source

pub fn headers_mut(&mut self) -> &mut HeaderMap

Get a mutable reference to the headers.

source

pub fn paging(self) -> Paging

source

pub fn build(self) -> GraphResult<RequestBuilder>

Builds the request and returns a reqwest::RequestBuilder.

source

pub async fn send(self) -> GraphResult<Response>

Trait Implementations§

source§

impl AsMut<Url> for RequestHandler

source§

fn as_mut(&mut self) -> &mut Url

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<Url> for RequestHandler

source§

fn as_ref(&self) -> &Url

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Default for RequestHandler

source§

fn default() -> RequestHandler

Returns the “default value” for a type. Read more
source§

impl ODataQuery<RequestHandler> for RequestHandler

source§

fn append_query_pair<KV: AsRef<str>>(self, key: KV, value: KV) -> Self

source§

fn count<S: AsRef<str>>(self, value: S) -> Self

Retrieves the total count of matching resources. See the docs
source§

fn select(self, value: &[&str]) -> Self

Filters properties (columns). See the docs
source§

fn expand(self, value: &[&str]) -> Self

Retrieves related resources. See the docs
source§

fn filter(self, value: &[&str]) -> Self

Filters results (rows). See the docs
source§

fn order_by(self, value: &[&str]) -> Self

Orders results. See the docs
source§

fn search<S: AsRef<str>>(self, value: S) -> Self

Returns results based on search criteria. See the docs
source§

fn format<S: AsRef<str>>(self, value: S) -> Self

Returns the results in the specified media format. See the docs
source§

fn skip<S: AsRef<str>>(self, value: S) -> Self

Indexes into a result set. Also used by some APIs to implement paging and can be used together with $top to manually page results. See the docs
source§

fn skip_token<S: AsRef<str>>(self, value: S) -> Self

Retrieves the next page of results from result sets that span multiple pages. (Some APIs use $skip instead.) See the docs
source§

fn delta_token<S: AsRef<str>>(self, value: S) -> Self

Retrieves the next page of results from result sets that span multiple pages. (Some APIs use $skip instead.) See the docs
source§

fn top<S: AsRef<str>>(self, value: S) -> Self

Sets the page size of results. See the docs

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more