[][src]Trait tenable::HttpRequest

pub trait HttpRequest<RE: Debug>: Clone {
    type Output;
    fn to_request(&self) -> Result<Request<Vec<u8>>, Error<RE>>;
fn from_response(&self, res: Response) -> Result<Self::Output, Error<RE>>; }

Generic Requests which provides information for further processing using the HTTP function given by the user

Associated Types

type Output

Type which is returned by the HTTP Endpoint

Loading content...

Required methods

fn to_request(&self) -> Result<Request<Vec<u8>>, Error<RE>>

Creates an HTTP Request which can be send using an Http Client

Errors

Fails if it is not possible to create a valid Request

fn from_response(&self, res: Response) -> Result<Self::Output, Error<RE>>

Parses the Http Client Response to its concret Type.

Errors

Fails in the following cases:

  • Server responded with error code
  • Unable to deserialize the server response
Loading content...

Implementors

impl<RE: Debug, '_> HttpRequest<RE> for AcrUpdate<'_>[src]

type Output = ()

impl<RE: Debug, '_> HttpRequest<RE> for AssetByUuidReq<'_>[src]

type Output = Option<AssetByUuid>

impl<RE: Debug, '_> HttpRequest<RE> for AssetsMove<'_>[src]

type Output = Option<MovedAssets>

impl<RE: Debug, '_> HttpRequest<RE> for AssetsReq<'_>[src]

type Output = Assets

Loading content...