b49020 commented on code in PR #164:
URL: 
https://github.com/apache/incubator-teaclave-trustzone-sdk/pull/164#discussion_r1924865439


##########
optee-utee/src/net/optee_no_std.rs:
##########
@@ -0,0 +1,150 @@
+// 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 super::{Setup, Socket, SocketAdapter, SocketError};
+
+/// A trait used for convenience; import it so that the code remains 
consistent 
+/// with the std version (with the only difference being the return error 
type).
+///
+/// Take TcpStream as example:
+/// ```no_run
+/// use optee_utee::net::TcpStream;
+///
+/// fn connect_without_compact_trait(host: &str, port: u16) -> 
Result<TcpStream, SocketError> {
+///     let setup = Setup::new_v4(host, port)?;
+///     TcpStream::open(setup)
+/// }
+///
+/// fn connect_with_compact_trait(host: &str, port: u16) -> Result<TcpStream, 
SocketError> {
+///     use optee_utee::net::StdCompactConnect;
+///
+///     TcpStream::connect_v4(host, port)
+/// }
+/// ```
+pub trait StdCompactConnect: Sized {

Review Comment:
   I suppose by name here you meant "Std compatible connect", right? If yes 
then we should rename it rather as s/StdCompactConnect/StdCompatConnect/. Same 
applies to other trait names as well.



-- 
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: dev-unsubscr...@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@teaclave.apache.org
For additional commands, e-mail: dev-h...@teaclave.apache.org

Reply via email to