Skip to main content

optee_teec/
lib.rs

1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements.  See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership.  The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License.  You may obtain a copy of the License at
8//
9//   http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied.  See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18#![cfg_attr(doc, doc = concat!(
19    env!("CARGO_PKG_DESCRIPTION"),
20    "\n",
21    "## Feature flags\n",
22    document_features::document_features!(),
23))]
24
25pub use self::context::Context;
26pub use self::error::{Error, ErrorKind, ErrorOrigin, Result};
27pub(crate) use self::error::{teec_check, teec_check_with_origin};
28pub use self::extension::*;
29pub use self::operation::Operation;
30pub use self::parameter::{Param, ParamNone, ParamTmpRef, ParamType, ParamTypes, ParamValue};
31pub use self::session::{ConnectionMethods, Session};
32pub use self::uuid::Uuid;
33// Re-export optee_teec_sys so developers don't have to add it to their cargo
34// dependencies.
35pub use optee_teec_sys as raw;
36
37// Re-export optee_teec_macros so developers don't have to add it as a separate
38// cargo dependency.
39// Gate it behind a feature flag to avoid unnecessary build-time overhead when
40// it’s not needed (see #283).
41#[cfg(feature = "macros")]
42pub use optee_teec_macros as macros;
43
44mod context;
45mod error;
46mod extension;
47mod operation;
48mod parameter;
49mod session;
50mod uuid;