pub struct Connection { /* private fields */ }Expand description
An enclave process connection to a CLI instance, an enclave or itself.
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn new(epoll_flags: EpollFlags, input_stream: Option<UnixStream>) -> Self
pub fn new(epoll_flags: EpollFlags, input_stream: Option<UnixStream>) -> Self
Create a new connection instance.
Sourcepub fn read_command(&self) -> NitroCliResult<EnclaveProcessCommandType>
pub fn read_command(&self) -> NitroCliResult<EnclaveProcessCommandType>
Read a command and its corresponding credentials.
Sourcepub fn read<T>(&self) -> NitroCliResult<T>where
T: DeserializeOwned,
pub fn read<T>(&self) -> NitroCliResult<T>where
T: DeserializeOwned,
Read an object of the specified type from this connection.
Sourcepub fn write_u64(&self, value: u64) -> NitroCliResult<()>
pub fn write_u64(&self, value: u64) -> NitroCliResult<()>
Write a 64-bit unsigned value on this connection.
Sourcepub fn println(&self, msg: &str) -> NitroCliResult<()>
pub fn println(&self, msg: &str) -> NitroCliResult<()>
Write a message to the standard output of the connection’s other end.
Sourcepub fn eprintln(&self, msg: &str) -> NitroCliResult<()>
pub fn eprintln(&self, msg: &str) -> NitroCliResult<()>
Write a message to the standard error of the connection’s other end.
Sourcepub fn write_status(&self, status: i32) -> NitroCliResult<()>
pub fn write_status(&self, status: i32) -> NitroCliResult<()>
Write an operation’s status to the connection’s other end.
Sourcepub fn get_enclave_event_flags(&self) -> NitroCliResult<Option<EpollFlags>>
pub fn get_enclave_event_flags(&self) -> NitroCliResult<Option<EpollFlags>>
Get the enclave event flags.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe for Connection
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.