Struct graph_http::GraphResponse
source · pub struct GraphResponse<T> { /* private fields */ }
Implementations§
source§impl<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§
source§impl<T> AsMut<T> for GraphResponse<T>
impl<T> AsMut<T> for GraphResponse<T>
source§impl<T> AsRef<T> for GraphResponse<T>
impl<T> AsRef<T> for GraphResponse<T>
source§impl<T: DeserializeOwned> AsyncTryFrom<Response, GraphResponse<T>> for GraphResponse<T>
impl<T: DeserializeOwned> AsyncTryFrom<Response, GraphResponse<T>> for GraphResponse<T>
source§impl<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,
source§impl<T: Debug> Debug for GraphResponse<T>
impl<T: Debug> Debug for GraphResponse<T>
source§impl<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.
source§fn try_from(response: Response) -> GraphResult<GraphResponse<T>>
fn try_from(response: Response) -> GraphResult<GraphResponse<T>>
Performs the conversion.
source§impl<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.