#[repr(C)]pub enum KactionValue {
U64(u64),
ObjID(ObjID),
}
Expand description
A value to pass for a KAction.
Variants§
Implementations§
source§impl KactionValue
impl KactionValue
sourcepub fn unwrap_objid(self) -> ObjID
pub fn unwrap_objid(self) -> ObjID
If the value is an object ID, return it, otherwise panic.
sourcepub fn objid(self) -> Option<ObjID>
pub fn objid(self) -> Option<ObjID>
If the value is an object ID, return it, otherwise return None.
sourcepub fn unwrap_u64(self) -> u64
pub fn unwrap_u64(self) -> u64
If the value is a u64, return it, otherwise panic.
Trait Implementations§
source§impl Clone for KactionValue
impl Clone for KactionValue
source§fn clone(&self) -> KactionValue
fn clone(&self) -> KactionValue
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 KactionValue
impl Debug for KactionValue
source§impl From<KactionValue> for (u64, u64)
impl From<KactionValue> for (u64, u64)
source§fn from(x: KactionValue) -> Self
fn from(x: KactionValue) -> Self
Converts to this type from the input type.
source§impl Ord for KactionValue
impl Ord for KactionValue
source§fn cmp(&self, other: &KactionValue) -> Ordering
fn cmp(&self, other: &KactionValue) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for KactionValue
impl PartialEq for KactionValue
source§impl PartialOrd for KactionValue
impl PartialOrd for KactionValue
impl Copy for KactionValue
impl Eq for KactionValue
impl StructuralPartialEq for KactionValue
Auto Trait Implementations§
impl Freeze for KactionValue
impl ObjSafe for KactionValue
impl RefUnwindSafe for KactionValue
impl Send for KactionValue
impl Sync for KactionValue
impl Unpin for KactionValue
impl UnwindSafe for KactionValue
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.