[−][src]Struct em_node_agent_client::client::Client
A client that implements the API by making HTTP calls out to a server.
Implementations
impl Client
[src]
pub fn try_new_http(base_path: &str) -> Result<Client, ClientInitError>
[src]
Create an HTTP client.
Arguments
base_path
- base path of the client API, i.e. "www.my-api-implementation.com"
pub fn try_new_with_connector<C, S>(
base_path: &str,
protocol: Option<&'static str>,
connector: C
) -> Result<Client, ClientInitError> where
C: NetworkConnector<Stream = S> + Send + Sync + 'static,
S: NetworkStream,
[src]
base_path: &str,
protocol: Option<&'static str>,
connector: C
) -> Result<Client, ClientInitError> where
C: NetworkConnector<Stream = S> + Send + Sync + 'static,
S: NetworkStream,
Create a client with a custom implementation of hyper::net::NetworkConnector.
Intended for use with custom implementations of connect for e.g. protocol logging
or similar functionality which requires wrapping the transport layer. When wrapping a TCP connection,
this function should be used in conjunction with
swagger::{http_connector, https_connector, https_mutual_connector}
.
For ordinary tcp connections, prefer the use of try_new_http
, try_new_https
and try_new_https_mutual
, to avoid introducing a dependency on the underlying transport layer.
Arguments
base_path
- base path of the client API, i.e. "www.my-api-implementation.com"protocol
- Which protocol to use when constructing the request url, e.g.Some("http")
connector
- An instance ofC: hyper::net::NetworkConnection
pub fn try_new_with_hyper_client(
hyper_client: Arc<Client>,
base_path: &str
) -> Result<Client, ClientInitError>
[src]
hyper_client: Arc<Client>,
base_path: &str
) -> Result<Client, ClientInitError>
Constructor for creating a Client
by passing in a pre-made hyper
client.
One should avoid relying on this function if possible, since it adds a dependency on the underlying transport implementation, which it would be better to abstract away. Therefore, using this function may lead to a loss of code generality, which may make it harder to move the application to a serverless environment, for example.
The reason for this function's existence is to support legacy test code, which did mocking at the hyper layer. This is not a recommended way to write new tests. If other reasons are found for using this function, they should be mentioned here.
This function is deprecated in the upstream openapi-generator which uses newer hyper. However, the suggested replacement does not exist in hyper 0.9.
pub fn headers(&mut self) -> &mut Headers
[src]
Trait Implementations
impl CertificateApi for Client
[src]
type Error = ApiError
fn get_issue_certificate_response(
&self,
param_task_id: Uuid
) -> Result<IssueCertificateResponse, ApiError>
[src]
&self,
param_task_id: Uuid
) -> Result<IssueCertificateResponse, ApiError>
fn issue_certificate(
&self,
param_body: IssueCertificateRequest
) -> Result<IssueCertificateResponse, ApiError>
[src]
&self,
param_body: IssueCertificateRequest
) -> Result<IssueCertificateResponse, ApiError>
impl Clone for Client
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Client
[src]
impl EnclaveApi for Client
[src]
type Error = ApiError
fn get_fortanix_attestation(
&self,
param_body: GetFortanixAttestationRequest
) -> Result<GetFortanixAttestationResponse, ApiError>
[src]
&self,
param_body: GetFortanixAttestationRequest
) -> Result<GetFortanixAttestationResponse, ApiError>
fn get_target_info(&self) -> Result<TargetInfo, ApiError>
[src]
impl SystemApi for Client
[src]
type Error = ApiError
fn get_agent_version(&self) -> Result<VersionResponse, ApiError>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, E> Api for T where
T: EnclaveApi<Error = E> + SystemApi<Error = E> + CertificateApi<Error = E>,
[src]
T: EnclaveApi<Error = E> + SystemApi<Error = E> + CertificateApi<Error = E>,
type Error = E
fn get_issue_certificate_response(
&Self,
Uuid
) -> Result<IssueCertificateResponse, <T as Api>::Error>
[src]
&Self,
Uuid
) -> Result<IssueCertificateResponse, <T as Api>::Error>
fn issue_certificate(
&Self,
IssueCertificateRequest
) -> Result<IssueCertificateResponse, <T as Api>::Error>
[src]
&Self,
IssueCertificateRequest
) -> Result<IssueCertificateResponse, <T as Api>::Error>
fn get_fortanix_attestation(
&Self,
GetFortanixAttestationRequest
) -> Result<GetFortanixAttestationResponse, <T as Api>::Error>
[src]
&Self,
GetFortanixAttestationRequest
) -> Result<GetFortanixAttestationResponse, <T as Api>::Error>
fn get_target_info(&Self) -> Result<TargetInfo, <T as Api>::Error>
[src]
fn get_agent_version(&Self) -> Result<VersionResponse, <T as Api>::Error>
[src]
impl<T, E> ApiMut for T where
T: EnclaveApiMut<Error = E> + SystemApiMut<Error = E> + CertificateApiMut<Error = E>,
[src]
T: EnclaveApiMut<Error = E> + SystemApiMut<Error = E> + CertificateApiMut<Error = E>,
type Error = E
fn get_issue_certificate_response(
&mut Self,
Uuid
) -> Result<IssueCertificateResponse, <T as ApiMut>::Error>
[src]
&mut Self,
Uuid
) -> Result<IssueCertificateResponse, <T as ApiMut>::Error>
fn issue_certificate(
&mut Self,
IssueCertificateRequest
) -> Result<IssueCertificateResponse, <T as ApiMut>::Error>
[src]
&mut Self,
IssueCertificateRequest
) -> Result<IssueCertificateResponse, <T as ApiMut>::Error>
fn get_fortanix_attestation(
&mut Self,
GetFortanixAttestationRequest
) -> Result<GetFortanixAttestationResponse, <T as ApiMut>::Error>
[src]
&mut Self,
GetFortanixAttestationRequest
) -> Result<GetFortanixAttestationResponse, <T as ApiMut>::Error>
fn get_target_info(&mut Self) -> Result<TargetInfo, <T as ApiMut>::Error>
[src]
fn get_agent_version(&mut Self) -> Result<VersionResponse, <T as ApiMut>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, E> CertificateApiMut for T where
T: CertificateApi<Error = E>,
[src]
T: CertificateApi<Error = E>,
type Error = E
fn get_issue_certificate_response(
&mut Self,
Uuid
) -> Result<IssueCertificateResponse, <T as CertificateApiMut>::Error>
[src]
&mut Self,
Uuid
) -> Result<IssueCertificateResponse, <T as CertificateApiMut>::Error>
fn issue_certificate(
&mut Self,
IssueCertificateRequest
) -> Result<IssueCertificateResponse, <T as CertificateApiMut>::Error>
[src]
&mut Self,
IssueCertificateRequest
) -> Result<IssueCertificateResponse, <T as CertificateApiMut>::Error>
impl<T, E> EnclaveApiMut for T where
T: EnclaveApi<Error = E>,
[src]
T: EnclaveApi<Error = E>,
type Error = E
fn get_fortanix_attestation(
&mut Self,
GetFortanixAttestationRequest
) -> Result<GetFortanixAttestationResponse, <T as EnclaveApiMut>::Error>
[src]
&mut Self,
GetFortanixAttestationRequest
) -> Result<GetFortanixAttestationResponse, <T as EnclaveApiMut>::Error>
fn get_target_info(&mut Self) -> Result<TargetInfo, <T as EnclaveApiMut>::Error>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, E> SystemApiMut for T where
T: SystemApi<Error = E>,
[src]
T: SystemApi<Error = E>,
type Error = E
fn get_agent_version(
&mut Self
) -> Result<VersionResponse, <T as SystemApiMut>::Error>
[src]
&mut Self
) -> Result<VersionResponse, <T as SystemApiMut>::Error>
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,