CCF
Loading...
Searching...
No Matches
kv_access_permissions.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
6
7namespace ccf::js
8{
10 {
11 ILLEGAL = 0,
12 READ_ONLY = 1 << 0,
13 WRITE_ONLY = 1 << 1,
15 };
16
19 {
20 /* This could use std::to_underlying from C++23 */
21 using T = std::underlying_type_t<KVAccessPermissions>;
22 const auto intersection = (T)l & (T)r;
23 return KVAccessPermissions(intersection);
24 }
25}
Definition bundle.h:12
KVAccessPermissions intersect_access_permissions(KVAccessPermissions l, KVAccessPermissions r)
Definition kv_access_permissions.h:17
KVAccessPermissions
Definition kv_access_permissions.h:10