Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. C/C++
  4. pw::rpc2::internal::UnaryFutureBase Class Reference
Loading...
Searching...
No Matches
pw::rpc2::internal::UnaryFutureBase Class Reference

Overview

Non-templated base class for UnaryFuture<Request, Response>.

Inheritance diagram for pw::rpc2::internal::UnaryFutureBase:
pw::rpc2::internal::FutureBase pw::rpc2::UnaryFuture< Request, Response >

Public Member Functions

void Cancel ()
 
- Public Member Functions inherited from pw::rpc2::internal::FutureBase
 FutureBase (const FutureBase &)=delete
 
FutureBase & operator= (const FutureBase &)=delete
 
constexpr bool is_pendable () const
 
constexpr bool is_complete () const
 

Protected Member Functions

 UnaryFutureBase (ReserveWriteFuture &&request_reservation)
 
 UnaryFutureBase (UnaryFutureBase &&) noexcept=default
 
UnaryFutureBase & operator= (UnaryFutureBase &&) noexcept=default
 
bool request_pending () const
 True until the request has been sent or has failed to send.
 
async2::Poll< RpcResult< ConstBuf > > PendRaw (async2::Context &cx, const void *request, SerializeFn serialize)
 
void PendAndDeserialize (async2::Context &cx, const void *request, SerializeFn serialize, void *result_out, DeserializeFn deserialize)
 
- Protected Member Functions inherited from pw::rpc2::internal::FutureBase
constexpr FutureBase (async2::FutureState::Pending)
 
constexpr FutureBase (async2::FutureState state)
 
constexpr FutureBase (FutureBase &&) noexcept=default
 
constexpr FutureBase & operator= (FutureBase &&) noexcept=default
 
constexpr void mark_pending ()
 
void mark_complete ()
 

Member Function Documentation

◆ Cancel()

void pw::rpc2::internal::UnaryFutureBase::Cancel ( )

Cancels the call. The future then resolves to kCancelled.

If the request has not been sent, nothing is sent: the server never learns of the call. If the request is waiting for transport buffer space, the future resolves once that wait ends. Otherwise, sends a cancellation to the server, as ResponseFuture::Cancel() does.

No-op if the call has already ended.


The documentation for this class was generated from the following file: