#![doc(html_logo_url = "https://edp.fortanix.com/img/docs/edp-logo.svg",
html_favicon_url = "https://edp.fortanix.com/favicon.ico",
html_root_url = "https://edp.fortanix.com/docs/api/")]
#[macro_use]
extern crate nix as ioctl_crate;
extern crate failure;
extern crate libc;
extern crate sgx_isa as abi;
extern crate sgxs as sgxs_crate;
#[macro_use]
extern crate failure_derive;
#[macro_use]
extern crate bitflags;
mod generic;
pub mod isgx;
pub mod sgx_enclave_common;
use std::fmt::Debug;
use std::os::raw::c_void;
use std::sync::Arc;
use sgxs_crate::loader;
#[derive(Debug)]
pub struct Tcs {
_mapping: Arc<Debug + Sync + Send>,
address: u64,
}
impl loader::Tcs for Tcs {
fn address(&self) -> *mut c_void {
self.address as _
}
}
#[derive(Debug)]
pub struct MappingInfo {
_mapping: Arc<Debug + Sync + Send>,
base: u64,
size: u64,
}
impl loader::MappingInfo for MappingInfo {
fn address(&self) -> *mut c_void {
self.base as _
}
fn size(&self) -> usize {
self.size as _
}
}