pub struct NitroCliFailure {
pub action: String,
pub subactions: Vec<String>,
pub error_code: NitroCliErrorEnum,
pub file: String,
pub line: u32,
pub additional_info: Vec<String>,
}Expand description
Struct that is passed along the backtrace and accumulates error messages.
Fields§
§action: StringMain action which was attempted and failed.
subactions: Vec<String>(Possibly) more subactions which lead to the root cause of the failure.
error_code: NitroCliErrorEnumComputer-readable error code.
file: StringFile in which the root error occurred.
line: u32Line at which the root error occurred.
additional_info: Vec<String>Additional info regarding the error, passed as individual components (for easier parsing).
Implementations§
Source§impl NitroCliFailure
impl NitroCliFailure
Sourcepub fn set_action(self, action: String) -> Self
pub fn set_action(self, action: String) -> Self
Sets the main action which failed (i.e. RUN_ENCLAVE).
Sourcepub fn add_subaction(self, subaction: String) -> Self
pub fn add_subaction(self, subaction: String) -> Self
Adds a new layer into the backtrace, corresponding to a failing subaction (i.e. NOT_ENOUGH_MEM).
Sourcepub fn set_error_code(self, error_code: NitroCliErrorEnum) -> Self
pub fn set_error_code(self, error_code: NitroCliErrorEnum) -> Self
Sets the error code.
Sourcepub fn set_file_and_line(self, file: &str, line: u32) -> Self
pub fn set_file_and_line(self, file: &str, line: u32) -> Self
Sets both error file and error line.
Trait Implementations§
Source§impl Debug for NitroCliFailure
impl Debug for NitroCliFailure
Source§impl Default for NitroCliFailure
impl Default for NitroCliFailure
impl Eq for NitroCliFailure
Source§impl PartialEq for NitroCliFailure
impl PartialEq for NitroCliFailure
impl StructuralPartialEq for NitroCliFailure
Auto Trait Implementations§
impl Freeze for NitroCliFailure
impl RefUnwindSafe for NitroCliFailure
impl Send for NitroCliFailure
impl Sync for NitroCliFailure
impl Unpin for NitroCliFailure
impl UnsafeUnpin for NitroCliFailure
impl UnwindSafe for NitroCliFailure
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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.