Struct graph_http::HttpClient

source ·
pub struct HttpClient<Client> { /* private fields */ }

Implementations§

Trait Implementations§

source§

impl Debug for HttpClient<RefCell<BlockingClient>>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<GraphRequest<Client, Body, Form>> for HttpClient<RefCell<BlockingClient>>

source§

fn from(client: BlockingClient) -> Self

Converts to this type from the input type.
source§

impl RequestClient for HttpClient<RefCell<BlockingClient>>

§

type Body = Body

§

type Form = Form

source§

fn token(&self) -> String

source§

fn set_token(&self, token: &str)

source§

fn ident(&self) -> ResourceIdentity

source§

fn set_ident(&self, ident: ResourceIdentity)

source§

fn url(&self) -> GraphUrl

source§

fn to_url(&self) -> Url

source§

fn set_url(&self, url: GraphUrl)

source§

fn method(&self) -> Method

source§

fn set_method(&self, method: Method)

source§

fn set_body<T: Into<Self::Body>>(&self, body: T)

source§

fn set_body_with_file(&self, path: PathBuf) -> GraphResult<()>

source§

fn header<T: IntoHeaderName>(&self, name: T, value: HeaderValue)

source§

fn set_header_map(&self, header_map: HeaderMap)

source§

fn clear_headers(&self)

source§

fn set_download_dir(&self, dir: PathBuf)

source§

fn set_upload_session(&self, file: PathBuf)

source§

fn set_form(&self, form: Self::Form)

source§

fn set_request_type(&self, req_type: RequestType)

source§

fn request_type(&self) -> RequestType

source§

fn url_ref<F>(&self, f: F)where F: Fn(&GraphUrl) + Sync,

source§

fn url_mut<F>(&self, f: F)where F: Fn(&mut GraphUrl) + Sync,

source§

fn registry<F>(&self, f: F)where F: Fn(&mut Handlebars) + Sync,

source§

fn render_template(&self, template: &str, json: &Value) -> String

source§

fn register_ident_helper(&self, resource_identity: ResourceIdentity)

source§

fn extend_path(&self, path: &[&str])

source§

fn set_request( &self, req_att: Vec<RequestAttribute<Body, Form>> ) -> GraphResult<()>

source§

fn set_timeout(&self, duration: Duration)

source§

fn set_body_with_serialize<B: Serialize>(&self, body: &B) -> GraphResult<()>

Auto Trait Implementations§

§

impl<Client> RefUnwindSafe for HttpClient<Client>where Client: RefUnwindSafe,

§

impl<Client> Send for HttpClient<Client>where Client: Send,

§

impl<Client> Sync for HttpClient<Client>where Client: Sync,

§

impl<Client> Unpin for HttpClient<Client>where Client: Unpin,

§

impl<Client> UnwindSafe for HttpClient<Client>where Client: UnwindSafe,

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