Page MenuHomePhabricator

D5004.diff
No OneTemporary

D5004.diff

diff --git a/services/backup/blob_client/src/lib.rs b/services/backup/blob_client/src/lib.rs
--- a/services/backup/blob_client/src/lib.rs
+++ b/services/backup/blob_client/src/lib.rs
@@ -10,9 +10,12 @@
#[cxx::bridge]
mod ffi {
extern "Rust" {
- fn put_client_initialize_cxx() -> ();
- fn put_client_blocking_read_cxx() -> ();
- unsafe fn put_client_write_cxx(data: *const c_char) -> ();
- fn put_client_terminate_cxx() -> ();
+ fn put_client_initialize_cxx() -> Result<()>;
+ unsafe fn put_client_write_cxx(
+ field_index: usize,
+ data: *const c_char,
+ ) -> Result<()>;
+ fn put_client_blocking_read_cxx() -> Result<String>;
+ fn put_client_terminate_cxx() -> Result<()>;
}
}
diff --git a/services/backup/blob_client/src/put_client.rs b/services/backup/blob_client/src/put_client.rs
--- a/services/backup/blob_client/src/put_client.rs
+++ b/services/backup/blob_client/src/put_client.rs
@@ -1,17 +1,26 @@
use libc::c_char;
-pub fn put_client_initialize_cxx() -> () {
+pub fn put_client_initialize_cxx() -> Result<(), String> {
unimplemented!();
}
-pub fn put_client_blocking_read_cxx() -> () {
+pub fn put_client_blocking_read_cxx() -> Result<String, String> {
unimplemented!();
}
-pub fn put_client_write_cxx(data: *const c_char) -> () {
+/**
+ * field index:
+ * 1 - holder (utf8 string)
+ * 2 - blob hash (utf8 string)
+ * 3 - data chunk (bytes)
+ */
+pub fn put_client_write_cxx(
+ field_index: usize,
+ data: *const c_char,
+) -> Result<(), String> {
unimplemented!();
}
-pub fn put_client_terminate_cxx() -> () {
+pub fn put_client_terminate_cxx() -> Result<(), String> {
unimplemented!();
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 29, 1:03 PM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597076
Default Alt Text
D5004.diff (1 KB)

Event Timeline