#[repr(u8)]pub enum CompileStatus {
Cached = 0,
Compiled = 1,
}Expand description
Status returned by the compile_* host functions.
Lets the caller distinguish a cheap cache hit from a fresh compile so it can charge weight accordingly.
Variants§
Cached = 0
Module was already in the per-extension cache; no compilation occurred.
Compiled = 1
Module was freshly compiled (and, for Module::from_storage_key, the
program bytes were read from storage).
Trait Implementations§
Source§impl Clone for CompileStatus
impl Clone for CompileStatus
Source§fn clone(&self) -> CompileStatus
fn clone(&self) -> CompileStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CompileStatus
Source§impl Debug for CompileStatus
impl Debug for CompileStatus
impl Eq for CompileStatus
Source§impl From<CompileStatus> for u8
impl From<CompileStatus> for u8
Source§fn from(enum_value: CompileStatus) -> Self
fn from(enum_value: CompileStatus) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CompileStatus
impl PartialEq for CompileStatus
Source§fn eq(&self, other: &CompileStatus) -> bool
fn eq(&self, other: &CompileStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompileStatus
Source§impl TryFrom<u8> for CompileStatus
impl TryFrom<u8> for CompileStatus
Source§type Error = TryFromPrimitiveError<CompileStatus>
type Error = TryFromPrimitiveError<CompileStatus>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for CompileStatus
impl TryFromPrimitive for CompileStatus
const NAME: &'static str = "CompileStatus"
type Primitive = u8
type Error = TryFromPrimitiveError<CompileStatus>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Freeze for CompileStatus
impl RefUnwindSafe for CompileStatus
impl Send for CompileStatus
impl Sync for CompileStatus
impl Unpin for CompileStatus
impl UnsafeUnpin for CompileStatus
impl UnwindSafe for CompileStatus
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