[mammoth] Move EndpointClient to move-only semantics.
This commit is contained in:
parent
2e89aee5a3
commit
90f33f31c5
15 changed files with 44 additions and 30 deletions
|
|
@ -1,13 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <glacier/container/pair.h>
|
||||
#include <glacier/memory/unique_ptr.h>
|
||||
#include <glacier/status/error_or.h>
|
||||
#include <zcall.h>
|
||||
#include <ztypes.h>
|
||||
|
||||
class EndpointClient {
|
||||
public:
|
||||
static EndpointClient AdoptEndpoint(z_cap_t cap);
|
||||
EndpointClient() = delete;
|
||||
EndpointClient(const EndpointClient&) = delete;
|
||||
EndpointClient& operator=(const EndpointClient&) = delete;
|
||||
|
||||
static glcr::UniquePtr<EndpointClient> AdoptEndpoint(z_cap_t cap);
|
||||
|
||||
template <typename Req, typename Resp>
|
||||
glcr::ErrorOr<glcr::Pair<Resp, z_cap_t>> CallEndpoint(const Req& req);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue