Struct graph_rs_sdk::http::GraphResponse
source · [−]pub struct GraphResponse<T> { /* private fields */ }Implementations
pub fn new(
url: GraphUrl,
body: T,
status: StatusCode,
headers: HeaderMap<HeaderValue>
) -> GraphResponse<T>
Trait Implementations
impl<T> AsyncTryFrom<Response, GraphResponse<T>> for GraphResponse<T> where
T: DeserializeOwned,
impl<T> AsyncTryFrom<Response, GraphResponse<T>> for GraphResponse<T> where
T: DeserializeOwned,
type Error = GraphFailure
pub fn async_try_from<'async_trait>(
response: Response
) -> Pin<Box<dyn Future<Output = Result<GraphResponse<T>, <GraphResponse<T> as AsyncTryFrom<Response, GraphResponse<T>>>::Error>> + Send + 'async_trait, Global>> where
GraphResponse<T>: 'async_trait,
impl<T> AsyncTryFrom<Result<Response, GraphFailure>, GraphResponse<T>> for GraphResponse<T> where
T: DeserializeOwned,
impl<T> AsyncTryFrom<Result<Response, GraphFailure>, GraphResponse<T>> for GraphResponse<T> where
T: DeserializeOwned,
type Error = GraphFailure
pub fn async_try_from<'async_trait>(
result: Result<Response, GraphFailure>
) -> Pin<Box<dyn Future<Output = Result<GraphResponse<T>, <GraphResponse<T> as AsyncTryFrom<Result<Response, GraphFailure>, GraphResponse<T>>>::Error>> + Send + 'async_trait, Global>> where
GraphResponse<T>: 'async_trait,
type Error = GraphFailure
type Error = GraphFailure
The type returned in the event of a conversion error.
Performs the conversion.
impl<T> TryFrom<Result<Response, GraphFailure>> for GraphResponse<T> where
T: DeserializeOwned,
impl<T> TryFrom<Result<Response, GraphFailure>> for GraphResponse<T> where
T: DeserializeOwned,
type Error = GraphFailure
type Error = GraphFailure
The type returned in the event of a conversion error.
pub fn try_from(
result: Result<Response, GraphFailure>
) -> Result<GraphResponse<T>, <GraphResponse<T> as TryFrom<Result<Response, GraphFailure>>>::Error>
pub fn try_from(
result: Result<Response, GraphFailure>
) -> Result<GraphResponse<T>, <GraphResponse<T> as TryFrom<Result<Response, GraphFailure>>>::Error>
Performs the conversion.
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
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more