template<typename Committed>
class pw::rpc2::internal::RequestReservationBase< Committed >
Shared implementation of UnaryReservation and ServerStreamReservation. Commit() returns Committed: the call's ResponseFuture or Reader.
|
|
| RequestReservationBase (const RequestReservationBase &)=delete |
| |
|
RequestReservationBase & | operator= (const RequestReservationBase &)=delete |
| |
| RpcResult< Committed > | Commit (size_t size_bytes) |
| |
|
| WriteReservationBase (const WriteReservationBase &)=delete |
| |
|
WriteReservationBase & | operator= (const WriteReservationBase &)=delete |
| |
|
| WriteReservationBase (WriteReservationBase &&other) noexcept=default |
| |
|
WriteReservationBase & | operator= (WriteReservationBase &&other) noexcept |
| |
|
std::byte * | data () |
| | Returns a pointer to the start of the reserved write buffer.
|
| |
|
const std::byte * | data () const |
| |
|
size_t | size () const |
| | Returns the size of the reserved write buffer in bytes.
|
| |
|
std::byte & | operator[] (size_t index) |
| | Accesses the byte at index.
|
| |
|
const std::byte & | operator[] (size_t index) const |
| |
|
iterator | begin () |
| | Returns an iterator to the beginning of the reserved buffer.
|
| |
|
const_iterator | begin () const |
| |
|
const_iterator | cbegin () const |
| |
|
iterator | end () |
| | Returns an iterator to the end of the reserved buffer.
|
| |
|
const_iterator | end () const |
| |
|
const_iterator | cend () const |
| |
|
void | Drop () |
| | Releases the reservation without sending any data.
|
| |
|
|
using | iterator = ByteSpan::iterator |
| |
|
using | const_iterator = ConstByteSpan::iterator |
| |
◆ Commit()
template<typename Committed >
Sends the first size_bytes bytes of the reserved buffer as the request and returns the future or reader for the server's response(s).
Consumes the reservation; it cannot be used or committed again. size_bytes must not exceed size().
- Returns
kOk with the call's response future or reader once the request is queued for transmission.
kWriteClosed: this reservation was already committed, dropped, or moved from.
- The call's completion status if the call ended while the reservation was held (for example,
kDisconnected because its connection closed). See Error handling.
kDisconnected: the connection closed before the request could be sent.
The documentation for this class was generated from the following file:
- pw_rpc2/cpp/public/pw_rpc2/service_client.h