Struct graph_http::GraphResponse
source · [−]pub struct GraphResponse<T> { /* private fields */ }
Implementations
sourceimpl<T> GraphResponse<T>
impl<T> GraphResponse<T>
pub fn new(
url: GraphUrl,
body: T,
status: StatusCode,
headers: HeaderMap
) -> GraphResponse<T>
sourcepub fn into_body(self) -> T
pub fn into_body(self) -> T
Returns the body and ownership of it and dropping the GraphResponse in the process.
sourcepub fn status(&self) -> StatusCode
pub fn status(&self) -> StatusCode
Get the HTTP status code of the response.
sourcepub fn job_status(&self) -> Option<GraphResult<GraphResponse<Value>>>
pub fn job_status(&self) -> Option<GraphResult<GraphResponse<Value>>>
This makes a request to the location header returned in this response for monitoring progress of long running actions.
This is a blocking request and not asycc. Use the method async_job_status
if you are using the async graph client.
sourcepub async fn async_job_status(
&self
) -> Option<GraphResult<GraphResponse<Value>>>
pub async fn async_job_status(
&self
) -> Option<GraphResult<GraphResponse<Value>>>
This makes a request to the location header returned in this response for monitoring progress of long running actions.
This is a async request and not blocking. Use the method job_status
if you
are using the blocking graph client.
Trait Implementations
sourceimpl<T> AsMut<T> for GraphResponse<T>
impl<T> AsMut<T> for GraphResponse<T>
sourceimpl<T> AsRef<T> for GraphResponse<T>
impl<T> AsRef<T> for GraphResponse<T>
sourceimpl<T: DeserializeOwned> AsyncTryFrom<Response, GraphResponse<T>> for GraphResponse<T>
impl<T: DeserializeOwned> AsyncTryFrom<Response, GraphResponse<T>> for GraphResponse<T>
sourceimpl<T: DeserializeOwned> AsyncTryFrom<Result<Response, GraphFailure>, GraphResponse<T>> for GraphResponse<T>
impl<T: DeserializeOwned> AsyncTryFrom<Result<Response, GraphFailure>, GraphResponse<T>> for GraphResponse<T>
type Error = GraphFailure
fn async_try_from<'async_trait>(
result: GraphResult<Response>
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>> where
Self: 'async_trait,
sourceimpl<T: Debug> Debug for GraphResponse<T>
impl<T: Debug> Debug for GraphResponse<T>
sourceimpl<T: DeserializeOwned> TryFrom<Response> for GraphResponse<T>
impl<T: DeserializeOwned> TryFrom<Response> for GraphResponse<T>
type Error = GraphFailure
type Error = GraphFailure
The type returned in the event of a conversion error.
sourcefn try_from(response: Response) -> GraphResult<GraphResponse<T>>
fn try_from(response: Response) -> GraphResult<GraphResponse<T>>
Performs the conversion.
sourceimpl<T: DeserializeOwned> TryFrom<Result<Response, GraphFailure>> for GraphResponse<T>
impl<T: DeserializeOwned> TryFrom<Result<Response, GraphFailure>> for GraphResponse<T>
type Error = GraphFailure
type Error = GraphFailure
The type returned in the event of a conversion error.
Auto Trait Implementations
impl<T> RefUnwindSafe for GraphResponse<T> where
T: RefUnwindSafe,
impl<T> Send for GraphResponse<T> where
T: Send,
impl<T> Sync for GraphResponse<T> where
T: Sync,
impl<T> Unpin for GraphResponse<T> where
T: Unpin,
impl<T> UnwindSafe for GraphResponse<T> where
T: UnwindSafe,
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