pub struct HalServiceClient<T> { /* private fields */ }Implementations§
Source§impl<T> HalServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> HalServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> HalServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn get_system_status(
&mut self,
request: impl IntoRequest<GetSystemStatusRequest>,
) -> Result<Response<HalSystemStatus>, Status>
pub async fn get_system_status( &mut self, request: impl IntoRequest<GetSystemStatusRequest>, ) -> Result<Response<HalSystemStatus>, Status>
Get complete HAL system status
Sourcepub async fn send_command(
&mut self,
request: impl IntoRequest<HalCommand>,
) -> Result<Response<HalCommandResponse>, Status>
pub async fn send_command( &mut self, request: impl IntoRequest<HalCommand>, ) -> Result<Response<HalCommandResponse>, Status>
Send a command
Sourcepub async fn get_value(
&mut self,
request: impl IntoRequest<GetValueCommand>,
) -> Result<Response<GetValueResponse>, Status>
pub async fn get_value( &mut self, request: impl IntoRequest<GetValueCommand>, ) -> Result<Response<GetValueResponse>, Status>
Get a single value
Sourcepub async fn query_pins(
&mut self,
request: impl IntoRequest<QueryPinsCommand>,
) -> Result<Response<QueryPinsResponse>, Status>
pub async fn query_pins( &mut self, request: impl IntoRequest<QueryPinsCommand>, ) -> Result<Response<QueryPinsResponse>, Status>
Query pins
Sourcepub async fn query_signals(
&mut self,
request: impl IntoRequest<QuerySignalsCommand>,
) -> Result<Response<QuerySignalsResponse>, Status>
pub async fn query_signals( &mut self, request: impl IntoRequest<QuerySignalsCommand>, ) -> Result<Response<QuerySignalsResponse>, Status>
Query signals
Sourcepub async fn query_params(
&mut self,
request: impl IntoRequest<QueryParamsCommand>,
) -> Result<Response<QueryParamsResponse>, Status>
pub async fn query_params( &mut self, request: impl IntoRequest<QueryParamsCommand>, ) -> Result<Response<QueryParamsResponse>, Status>
Query parameters
Sourcepub async fn query_components(
&mut self,
request: impl IntoRequest<QueryComponentsCommand>,
) -> Result<Response<QueryComponentsResponse>, Status>
pub async fn query_components( &mut self, request: impl IntoRequest<QueryComponentsCommand>, ) -> Result<Response<QueryComponentsResponse>, Status>
Query components
Sourcepub async fn stream_status(
&mut self,
request: impl IntoRequest<HalStreamStatusRequest>,
) -> Result<Response<Streaming<HalSystemStatus>>, Status>
pub async fn stream_status( &mut self, request: impl IntoRequest<HalStreamStatusRequest>, ) -> Result<Response<Streaming<HalSystemStatus>>, Status>
Stream system status updates
Sourcepub async fn watch_values(
&mut self,
request: impl IntoRequest<WatchRequest>,
) -> Result<Response<Streaming<ValueChangeBatch>>, Status>
pub async fn watch_values( &mut self, request: impl IntoRequest<WatchRequest>, ) -> Result<Response<Streaming<ValueChangeBatch>>, Status>
Watch for value changes
Trait Implementations§
Source§impl<T: Clone> Clone for HalServiceClient<T>
impl<T: Clone> Clone for HalServiceClient<T>
Source§fn clone(&self) -> HalServiceClient<T>
fn clone(&self) -> HalServiceClient<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for HalServiceClient<T>
impl<T> RefUnwindSafe for HalServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for HalServiceClient<T>where
T: Send,
impl<T> Sync for HalServiceClient<T>where
T: Sync,
impl<T> Unpin for HalServiceClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for HalServiceClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for HalServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request