A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
bridge_core.h
Go to the documentation of this file.
1// Copyright 2026 The A11 Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef A11_WASM_BRIDGE_CORE_H_
16#define A11_WASM_BRIDGE_CORE_H_
17
18#include <cstddef>
19#include <cstdint>
20#include <string>
21#include <string_view>
22
23#include <absl/status/status.h>
24
25struct Result {
26 int code = 0;
27 std::string bytes;
28 bool ready = true;
29};
30
31Result* Failure(const absl::Status& status);
33Result* FromStatus(const absl::Status& status);
34std::string_view View(const std::uint8_t* data, size_t size);
35std::string_view View(const char* data, size_t size);
36
37#endif // A11_WASM_BRIDGE_CORE_H_
std::string_view View(const std::uint8_t *data, size_t size)
Definition bridge_core.cc:43
Result * Failure(const absl::Status &status)
Definition bridge_core.cc:35
Result * FromStatus(const absl::Status &status)
Definition bridge_core.cc:55
Result * Success()
Definition bridge_core.cc:51
std::string data
Definition sqlite_chunk_store.cc:192
Definition bridge_core.h:25
bool ready
Definition bridge_core.h:28
std::string bytes
Definition bridge_core.h:27
int code
Definition bridge_core.h:26