[−][src]Struct optee_teec::Context
An abstraction of the logical connection between a client application and a TEE.
Methods
impl Context
[src]
pub fn new() -> Result<Context>
[src]
pub fn new_raw(fd: c_int, reg_mem: bool) -> Result<TEEC_Context>
[src]
Creates a raw TEE client context with implementation defined parameters.
Examples
let raw_ctx: optee_teec_sys::TEEC_Context = Context::new_raw(0, true).unwrap();
pub fn as_mut_raw_ptr(&mut self) -> *mut TEEC_Context
[src]
Converts a TEE client context to a raw pointer.
Examples
let mut ctx = Context::new().unwrap(); let mut raw_ptr: *mut optee_teec_sys::TEEC_Context = ctx.as_mut_raw_ptr();
pub fn open_session(&mut self, uuid: Uuid) -> Result<Session>
[src]
Opens a new session with the specified trusted application.
The target trusted application is specified by uuid
.
Examples
let mut ctx = Context::new().unwrap(); let uuid = Uuid::parse_str("8abcf200-2450-11e4-abe2-0002a5d5c51b").unwrap(); let session = ctx.open_session(uuid).unwrap();
pub fn open_session_with_operation<A: Param, B: Param, C: Param, D: Param>(
&mut self,
uuid: Uuid,
operation: &mut Operation<A, B, C, D>
) -> Result<Session>
[src]
&mut self,
uuid: Uuid,
operation: &mut Operation<A, B, C, D>
) -> Result<Session>
Opens a new session with the specified trusted application, pass some parameters to TA by an operation.
The target trusted application is specified by uuid
.
Examples
let mut ctx = Context::new().unwrap(); let uuid = Uuid::parse_str("8abcf200-2450-11e4-abe2-0002a5d5c51b").unwrap(); let p0 = ParamValue(42, 0, ParamType::ValueInout); let mut operation = Operation::new(0, p0, ParamNone, ParamNone, ParamNone); let session = ctx.open_session_with_operation(uuid, operation).unwrap();
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,