Skip to main content

EnclaveBuilder

Struct EnclaveBuilder 

Source
pub struct EnclaveBuilder<P: EnclavePlatform<T>, T: EnclaveType> { /* private fields */ }

Implementations§

Source§

impl<P: EnclavePlatform<T>, T: EnclaveType> EnclaveBuilder<P, T>

Source

pub fn new(platform: P) -> Self

Source

pub fn stream_router<R: Into<Box<dyn StreamRouter + Send + Sync>>>( &mut self, router: R, ) -> &mut Self

The stream router that this enclave should use when the enclave is creating any streams. Defaults to OsStreamRouter.

Source

pub fn forward_panics(&mut self, fp: bool) -> &mut Self

Whether to panic the runner if any enclave thread panics. Defaults to false. Note: If multiple enclaves are loaded, and an enclave with this set to true panics, then all enclaves handled by this runner will exit because the runner itself will panic.

Source

pub fn build(self, loader: P::Loader) -> Result<T, Error>

Source§

impl<P: EnclavePlatform<Command>> EnclaveBuilder<P, Command>

Source

pub fn args<I, S>(&mut self, args: I) -> &mut Self
where I: IntoIterator<Item = S>, S: AsRef<[u8]>,

Adds multiple arguments to pass to enclave’s fn main. NOTE: This is not an appropriate channel for passing secrets or security configurations to the enclave.

Source

pub fn arg<S: AsRef<[u8]>>(&mut self, arg: S) -> &mut Self

Adds an argument to pass to enclave’s fn main. NOTE: This is not an appropriate channel for passing secrets or security configurations to the enclave.

Source

pub fn num_worker_threads(&mut self, num_worker_threads: usize) -> &mut Self

Sets the number of worker threads used to run the enclave.

Auto Trait Implementations§

§

impl<P, T> Freeze for EnclaveBuilder<P, T>
where P: Freeze, <T as EnclaveTypePrivate>::ConfigurationBuilder: Freeze,

§

impl<P, T> !RefUnwindSafe for EnclaveBuilder<P, T>

§

impl<P, T> Send for EnclaveBuilder<P, T>
where P: Send, <T as EnclaveTypePrivate>::ConfigurationBuilder: Send,

§

impl<P, T> Sync for EnclaveBuilder<P, T>
where P: Sync, <T as EnclaveTypePrivate>::ConfigurationBuilder: Sync,

§

impl<P, T> Unpin for EnclaveBuilder<P, T>
where P: Unpin, <T as EnclaveTypePrivate>::ConfigurationBuilder: Unpin,

§

impl<P, T> UnsafeUnpin for EnclaveBuilder<P, T>
where P: UnsafeUnpin, <T as EnclaveTypePrivate>::ConfigurationBuilder: UnsafeUnpin,

§

impl<P, T> !UnwindSafe for EnclaveBuilder<P, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.