pub struct EnclaveBuilder<P: EnclavePlatform<T>, T: EnclaveType> { /* private fields */ }Implementations§
Source§impl<P: EnclavePlatform<T>, T: EnclaveType> EnclaveBuilder<P, T>
impl<P: EnclavePlatform<T>, T: EnclaveType> EnclaveBuilder<P, T>
pub fn new(platform: P) -> Self
Sourcepub fn stream_router<R: Into<Box<dyn StreamRouter + Send + Sync>>>(
&mut self,
router: R,
) -> &mut Self
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.
Sourcepub fn forward_panics(&mut self, fp: bool) -> &mut Self
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.
pub fn build(self, loader: P::Loader) -> Result<T, Error>
Source§impl<P: EnclavePlatform<Command>> EnclaveBuilder<P, Command>
impl<P: EnclavePlatform<Command>> EnclaveBuilder<P, Command>
Sourcepub fn args<I, S>(&mut self, args: I) -> &mut Self
pub fn args<I, S>(&mut self, args: I) -> &mut Self
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.
Sourcepub fn arg<S: AsRef<[u8]>>(&mut self, arg: S) -> &mut Self
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.
Sourcepub fn num_worker_threads(&mut self, num_worker_threads: usize) -> &mut Self
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>
impl<P, T> !RefUnwindSafe for EnclaveBuilder<P, T>
impl<P, T> Send for EnclaveBuilder<P, T>
impl<P, T> Sync for EnclaveBuilder<P, T>
impl<P, T> Unpin for EnclaveBuilder<P, T>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more