Ji-Xinyou commented on code in PR #3479:
URL: 
https://github.com/apache/incubator-opendal/pull/3479#discussion_r1382517622


##########
bindings/c/src/operator_info.rs:
##########
@@ -0,0 +1,279 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::ffi::{c_char, CString};
+
+use ::opendal as core;
+
+use crate::opendal_operator;
+
+/// \brief Metadata for **operator**, users can use this metadata to get 
information
+/// of operator.
+#[repr(C)]
+pub struct opendal_operator_info {
+    pub inner: *mut core::OperatorInfo,
+}
+
+/// \brief Capability is used to describe what operations are supported
+/// by current Operator.
+#[repr(C)]
+pub struct opendal_capability {
+    /// If operator supports stat.
+    pub stat: bool,
+    /// If operator supports stat with if match.
+    pub stat_with_if_match: bool,
+    /// If operator supports stat with if none match.
+    pub stat_with_if_none_match: bool,
+
+    /// If operator supports read.
+    pub read: bool,
+    /// If operator supports seek on returning reader.
+    pub read_can_seek: bool,
+    /// If operator supports next on returning reader.
+    pub read_can_next: bool,
+    /// If operator supports read with range.
+    pub read_with_range: bool,
+    /// If operator supports read with if match.
+    pub read_with_if_match: bool,
+    /// If operator supports read with if none match.
+    pub read_with_if_none_match: bool,
+    /// if operator supports read with override cache control.
+    pub read_with_override_cache_control: bool,
+    /// if operator supports read with override content disposition.
+    pub read_with_override_content_disposition: bool,
+    /// if operator supports read with override content type.
+    pub read_with_override_content_type: bool,
+
+    /// If operator supports write.
+    pub write: bool,
+    /// If operator supports write can be called in multi times.
+    pub write_can_multi: bool,
+    /// If operator supports write with empty content.
+    pub write_can_empty: bool,
+    /// If operator supports write by append.
+    pub write_can_append: bool,
+    /// If operator supports write with content type.
+    pub write_with_content_type: bool,
+    /// If operator supports write with content disposition.
+    pub write_with_content_disposition: bool,
+    /// If operator supports write with cache control.
+    pub write_with_cache_control: bool,
+    /// write_multi_max_size is the max size that services support in 
write_multi.
+    ///
+    /// For example, AWS S3 supports 5GiB as max in write_multi.
+    ///
+    /// If it is not set, this will be zero

Review Comment:
   What about this workaround, we make it to `int64_t` and mark it `-1` if is 
None.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to