pub enum Volatility {
Immutable,
Stable,
Volatile,
}Expand description
Volatility category of a function.
Variants§
Immutable
Result never changes for the same input (allows aggressive caching).
Stable
Result is stable within a single transaction.
Volatile
Result may change at any time (default).
Trait Implementations§
Source§impl Clone for Volatility
impl Clone for Volatility
Source§fn clone(&self) -> Volatility
fn clone(&self) -> Volatility
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 Volatility
Source§impl Debug for Volatility
impl Debug for Volatility
Source§impl<'de> Deserialize<'de> for Volatility
impl<'de> Deserialize<'de> for Volatility
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Volatility
Source§impl Hash for Volatility
impl Hash for Volatility
Source§impl PartialEq for Volatility
impl PartialEq for Volatility
Source§fn eq(&self, other: &Volatility) -> bool
fn eq(&self, other: &Volatility) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Volatility
impl Serialize for Volatility
impl StructuralPartialEq for Volatility
Auto Trait Implementations§
impl Freeze for Volatility
impl RefUnwindSafe for Volatility
impl Send for Volatility
impl Sync for Volatility
impl Unpin for Volatility
impl UnsafeUnpin for Volatility
impl UnwindSafe for Volatility
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more