[−][src]Enum runestick::Key
A key that can be used as an anonymous object key.
Variants
A constant unit.
Byte(u8)
A byte.
Char(char)
A character.
Bool(bool)
A boolean constant value.
Integer(i64)
An integer constant.
A string constant designated by its slot.
Bytes(Bytes)
A byte string.
A vector of values.
An anonymous tuple.
An option.
A variant.
Implementations
impl Key
[src]
pub fn from_value(value: &Value) -> Result<Self, VmError>
[src]
Convert a value reference into a key.
pub fn into_value(self) -> Value
[src]
Convert into virtual machine value.
We provide this associated method since a constant value can be converted into a value infallibly, which is not captured by the trait otherwise.
pub fn into_bool(self) -> Result<bool, Self>
[src]
Try to coerce into boolean.
pub fn type_info(&self) -> TypeInfo
[src]
Get the type information of the value.
Trait Implementations
impl Clone for Key
[src]
impl Debug for Key
[src]
impl<'de> Deserialize<'de> for Key
[src]
Deserialize implementation for value.
pub fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for Key
[src]
impl From<String> for Key
[src]
impl From<i64> for Key
[src]
impl FromValue for Key
[src]
pub fn from_value(value: Value) -> Result<Self, VmError>
[src]
impl Hash for Key
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Key
[src]
pub fn cmp(&self, other: &Key) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Key> for Key
[src]
impl PartialOrd<Key> for Key
[src]
pub fn partial_cmp(&self, other: &Key) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Key) -> bool
[src]
pub fn le(&self, other: &Key) -> bool
[src]
pub fn gt(&self, other: &Key) -> bool
[src]
pub fn ge(&self, other: &Key) -> bool
[src]
impl Serialize for Key
[src]
Serialize implementation for value.
impl StructuralEq for Key
[src]
impl StructuralPartialEq for Key
[src]
impl ToValue for Key
[src]
Auto Trait Implementations
impl RefUnwindSafe for Key
[src]
impl Send for Key
[src]
impl Sync for Key
[src]
impl Unpin for Key
[src]
impl UnwindSafe for Key
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash,
T: Hash,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,