Struct soroban_env_guest::Status
source · [−]pub struct Status(_);
Expand description
Wrapper for a RawVal that is tagged with Tag::Status, interpreting the RawVal’s body as a pair of a 28-bit status-type code and a 32-bit status code. The status-type codes correspond to the enumerated cases of ScStatusType, and the status codes correspond to the code values stored in each variant of the ScStatus union.
Implementations
Trait Implementations
sourceimpl From<BitSetError> for Status
impl From<BitSetError> for Status
sourcefn from(bse: BitSetError) -> Status
fn from(bse: BitSetError) -> Status
Converts to this type from the input type.
sourceimpl From<ConversionError> for Status
impl From<ConversionError> for Status
sourcefn from(ConversionError) -> Status
fn from(ConversionError) -> Status
Converts to this type from the input type.
sourceimpl From<ScHostContextErrorCode> for Status
impl From<ScHostContextErrorCode> for Status
sourcefn from(code: ScHostContextErrorCode) -> Status
fn from(code: ScHostContextErrorCode) -> Status
Converts to this type from the input type.
sourceimpl From<ScHostFnErrorCode> for Status
impl From<ScHostFnErrorCode> for Status
sourcefn from(code: ScHostFnErrorCode) -> Status
fn from(code: ScHostFnErrorCode) -> Status
Converts to this type from the input type.
sourceimpl From<ScHostObjErrorCode> for Status
impl From<ScHostObjErrorCode> for Status
sourcefn from(code: ScHostObjErrorCode) -> Status
fn from(code: ScHostObjErrorCode) -> Status
Converts to this type from the input type.
sourceimpl From<ScHostStorageErrorCode> for Status
impl From<ScHostStorageErrorCode> for Status
sourcefn from(code: ScHostStorageErrorCode) -> Status
fn from(code: ScHostStorageErrorCode) -> Status
Converts to this type from the input type.
sourceimpl From<ScHostValErrorCode> for Status
impl From<ScHostValErrorCode> for Status
sourcefn from(code: ScHostValErrorCode) -> Status
fn from(code: ScHostValErrorCode) -> Status
Converts to this type from the input type.
sourceimpl From<ScUnknownErrorCode> for Status
impl From<ScUnknownErrorCode> for Status
sourcefn from(code: ScUnknownErrorCode) -> Status
fn from(code: ScUnknownErrorCode) -> Status
Converts to this type from the input type.
sourceimpl From<ScVmErrorCode> for Status
impl From<ScVmErrorCode> for Status
sourcefn from(code: ScVmErrorCode) -> Status
fn from(code: ScVmErrorCode) -> Status
Converts to this type from the input type.
sourceimpl From<SymbolError> for Status
impl From<SymbolError> for Status
sourcefn from(se: SymbolError) -> Status
fn from(se: SymbolError) -> Status
Converts to this type from the input type.
sourceimpl Ord for Status
impl Ord for Status
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Status> for Status
impl PartialOrd<Status> for Status
sourcefn partial_cmp(&self, other: &Status) -> Option<Ordering>
fn partial_cmp(&self, other: &Status) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl RawValConvertible for Status
impl RawValConvertible for Status
sourcefn is_val_type(v: RawVal) -> bool
fn is_val_type(v: RawVal) -> bool
Returns true
if v
is in a union state compatible with Self
.
sourceunsafe fn unchecked_from_val(v: RawVal) -> Status
unsafe fn unchecked_from_val(v: RawVal) -> Status
Converts the bits making up a RawVal
into Self
without checking
that the RawVal
is tagged correctly, assuming that such a check has
been performed elsewhere. It is the caller’s responsibility to arrange
that such checks have occurred before calling unchecked_from_val
,
which is why it is marked as unsafe
(it does not represent a risk of
memory-unsafety, merely “serious logic errors”). Read more
sourcefn try_convert(v: RawVal) -> Option<Self>
fn try_convert(v: RawVal) -> Option<Self>
Attempt a conversion from RawVal
to Self
, returning None
if the
provided RawVal
is not tagged correctly. By default this calls
Self::is_val_type
and Self::unchecked_from_val
, but it can be
customized on a type-by-type basis to avoid redundant tag tests and
produce more efficient code, as it is done for Static
values like
bool
. Read more
impl Copy for Status
impl Eq for Status
impl Val for Status
Auto Trait Implementations
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more