pub enum OperationCompletionStatus {
Completed,
InterruptedBeforeOutOfGas,
}Expand description
Standard way of signalling that an operation was interrupted early, before running out of gas. An endpoint that performs a longer operation can check from time to time if it is running low on gas and can decide to save its state and exit, so that it can continue the same operation later.
Variants§
Implementations§
source§impl OperationCompletionStatus
impl OperationCompletionStatus
pub fn output_bytes(&self) -> &'static [u8]
pub fn is_completed(&self) -> bool
pub fn is_interrupted(&self) -> bool
Trait Implementations§
source§impl Clone for OperationCompletionStatus
impl Clone for OperationCompletionStatus
source§fn clone(&self) -> OperationCompletionStatus
fn clone(&self) -> OperationCompletionStatus
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for OperationCompletionStatus
impl Debug for OperationCompletionStatus
source§impl EndpointResult for OperationCompletionStatus
impl EndpointResult for OperationCompletionStatus
§type DecodeAs = BoxedBytes
type DecodeAs = BoxedBytes
Indicates how the result of the endpoint can be interpreted when called via proxy.
Self for most types.fn finish<FA>(&self)where
FA: ManagedTypeApi + EndpointFinishApi,
source§impl PartialEq for OperationCompletionStatus
impl PartialEq for OperationCompletionStatus
source§fn eq(&self, other: &OperationCompletionStatus) -> bool
fn eq(&self, other: &OperationCompletionStatus) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TypeAbi for OperationCompletionStatus
impl TypeAbi for OperationCompletionStatus
fn type_name() -> String
source§fn provide_type_descriptions<TDC: TypeDescriptionContainer>(
accumulator: &mut TDC
)
fn provide_type_descriptions<TDC: TypeDescriptionContainer>( accumulator: &mut TDC )
A type can provide more than its own description.
For instance, a struct can also provide the descriptions of the type of its fields.
TypeAbi doesn’t care for the exact accumulator type,
which is abstracted by the TypeDescriptionContainer trait.
impl Copy for OperationCompletionStatus
impl StructuralPartialEq for OperationCompletionStatus
Auto Trait Implementations§
impl RefUnwindSafe for OperationCompletionStatus
impl Send for OperationCompletionStatus
impl Sync for OperationCompletionStatus
impl Unpin for OperationCompletionStatus
impl UnwindSafe for OperationCompletionStatus
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