Struct openwhisk_rust::NativeClient
source · [−]pub struct NativeClient(_);
Expand description
A Client to make Requests with.
Trait Implementations
sourceimpl Clone for NativeClient
impl Clone for NativeClient
sourceimpl Debug for NativeClient
impl Debug for NativeClient
sourceimpl Default for NativeClient
impl Default for NativeClient
sourcefn default() -> NativeClient
fn default() -> NativeClient
Returns the “default value” for a type. Read more
sourceimpl OpenWhisk for NativeClient
impl OpenWhisk for NativeClient
type Output = NativeClient
type Output = NativeClient
NativeClient - Http Client (Here client is Reqwest Client)
sourceimpl Service for NativeClient
impl Service for NativeClient
sourcefn new_request(
&self,
method: Option<HttpMethods>,
url: &str,
use_auth: Option<(&str, &str)>,
body: Option<Value>
) -> Result<Self::Output, String>
fn new_request(
&self,
method: Option<HttpMethods>,
url: &str,
use_auth: Option<(&str, &str)>,
body: Option<Value>
) -> Result<Self::Output, String>
Creates New Request and Returns reqwest::blocking::RequestBuilder
Arguments
method
- Option of HTTPMethodsurl
- API Host urluse_auth
- Option of tuple conatining Username and Passwordbody
- Option of value which can have parameters necessary for the body of request
sourcefn invoke_request(&self, request: Self::Output) -> Result<Value, String>
fn invoke_request(&self, request: Self::Output) -> Result<Value, String>
To invoke request and get response out of request execution
Arguments
request
- Http request with url,auth and body
type Output = RequestBuilder
Auto Trait Implementations
impl !RefUnwindSafe for NativeClient
impl Send for NativeClient
impl Sync for NativeClient
impl Unpin for NativeClient
impl !UnwindSafe for NativeClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more