Trait mc_sgx_util::ResultInto
source · pub trait ResultInto<T: TryFrom<Self>>: Sized {
// Provided method
fn into_result(self) -> Result<<T as TryFrom<Self>>::Error, T> { ... }
}
Expand description
An inverse of the ResultFrom
trait, which is attached to the status
type.
As with TryInto
, this trait is not intended to
be implemented manually, but instead should be added to an FFI type via
explicit impl block attached to it’s derivative wrapper type.
ⓘ
// Pick up the default implementation of [`ResultInto`]
impl ResultInto<AnError> for a_status_t {}
That is, users should not attach this to a bindgen-generated status type,
they should attach ResultFrom
to the intended error wrapper associated
with it, and they will get this for free.
Provided Methods§
sourcefn into_result(self) -> Result<<T as TryFrom<Self>>::Error, T>
fn into_result(self) -> Result<<T as TryFrom<Self>>::Error, T>
Flips the result of T::TryFrom<Self>
.
Object Safety§
This trait is not object safe.