Enum twizzler_abi::kso::KactionValue
source · #[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<KactionValue> for KactionValue
impl PartialEq<KactionValue> for KactionValue
source§fn eq(&self, other: &KactionValue) -> bool
fn eq(&self, other: &KactionValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<KactionValue> for KactionValue
impl PartialOrd<KactionValue> for KactionValue
source§fn partial_cmp(&self, other: &KactionValue) -> Option<Ordering>
fn partial_cmp(&self, other: &KactionValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for KactionValue
impl Eq for KactionValue
impl StructuralEq for KactionValue
impl StructuralPartialEq for KactionValue
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.