pub enum StackLimiterVersion {
V0,
V1,
}
Expand description
Our original code for limiting WASM stack was buggy. We fixed that, but we
still have to use old (V0
) limiter for old protocol versions.
This struct here exists to enforce that the value in the config is either
0
or 1
. We could have used a bool
instead, but there’s a chance that
our current impl isn’t perfect either and would need further tweaks in the
future.
Variants
V0
Old, buggy version, don’t use it unless specifically to support old protocol version.
V1
What we use in today’s protocol.
Trait Implementations
sourceimpl Clone for StackLimiterVersion
impl Clone for StackLimiterVersion
sourcefn clone(&self) -> StackLimiterVersion
fn clone(&self) -> StackLimiterVersion
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StackLimiterVersion
impl Debug for StackLimiterVersion
sourceimpl<'de> Deserialize<'de> for StackLimiterVersion
impl<'de> Deserialize<'de> for StackLimiterVersion
sourcefn deserialize<D>(
deserializer: D
) -> Result<StackLimiterVersion, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<StackLimiterVersion, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for StackLimiterVersion
impl Hash for StackLimiterVersion
sourceimpl Serialize for StackLimiterVersion
impl Serialize for StackLimiterVersion
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for StackLimiterVersion
impl Eq for StackLimiterVersion
impl StructuralEq for StackLimiterVersion
impl StructuralPartialEq for StackLimiterVersion
Auto Trait Implementations
impl RefUnwindSafe for StackLimiterVersion
impl Send for StackLimiterVersion
impl Sync for StackLimiterVersion
impl Unpin for StackLimiterVersion
impl UnwindSafe for StackLimiterVersion
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more