[−][src]Struct parsec_client::core::operation_client::OperationClient
Low-level client optimised for communicating with the Parsec service at an operation level.
Usage is recommended when fine control over how operations are wrapped and processed is needed.
Fields
content_converter: Box<dyn Convert + Send + Sync>
Converter that manages request body conversions
Defaults to a Protobuf converter
accept_converter: Box<dyn Convert + Send + Sync>
Converter that manages response body conversions
Defaults to a Protobuf converter
request_client: RequestClient
Client for request and response objects
Implementations
impl OperationClient
[src]
pub fn new() -> OperationClient
[src]
Creates an OperationClient instance. The request client uses a timeout of 5 seconds on reads and writes on the socket. It uses the version 1.0 wire protocol to form requests, the direct authentication method and protobuf format as content type.
pub fn process_operation(
&self,
operation: NativeOperation,
provider: ProviderID,
auth: &Authentication
) -> Result<NativeResult>
[src]
&self,
operation: NativeOperation,
provider: ProviderID,
auth: &Authentication
) -> Result<NativeResult>
Send an operation to a specific provider and get a result.
Errors
If the conversions between operation to request or between response to result fail, returns
a serializing or deserializing error. Returns an error if the operation itself failed. If the
opcode is different between request and response, InvalidServiceResponseType
is returned.
Trait Implementations
impl Debug for OperationClient
[src]
impl Default for OperationClient
[src]
Auto Trait Implementations
impl !RefUnwindSafe for OperationClient
impl Send for OperationClient
impl Sync for OperationClient
impl Unpin for OperationClient
impl !UnwindSafe for OperationClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,