pub enum ThreadSafeFieldValue {
StringVal(String),
IntVal(i32),
PointerVal(u64),
ContextVal(ThreadSafeContext),
TimeVal(time_t),
}
Expand description
Thread-safe versions of the FieldValue
variants provided by
ListIterator
.
Variants
- StringVal - A string has been returned. The enum item holds its value.
- IntVal - Integer value.
- PointerVal - A
u64
value representing the value of a pointer. - ContextVal - Holds a
ThreadSafeContext
that can be used from other threads. - TimeVal - Holds a
i64
value which can be cast to atime_t
numeric value.
Variants§
Implementations§
source§impl ThreadSafeFieldValue
impl ThreadSafeFieldValue
sourcepub fn str(self) -> String
pub fn str(self) -> String
Convert a StringVal variant to a String. FieldValue also implements
From<String>
so you can also use let s: String = fv.into();
to convert.
sourcepub fn int(self) -> i32
pub fn int(self) -> i32
Convert an IntVal variant to an i32. FieldValue also implements
From<i32>
so you can also use let i: i32 = fv.into();
to convert.
sourcepub fn ptr(self) -> u64
pub fn ptr(self) -> u64
Convert a PointerVal variant to a u64. FieldValue also implements
From<u64>
so you can also use let p: u64 = fv.into();
to convert.
sourcepub fn time(self) -> time_t
pub fn time(self) -> time_t
Convert a TimeVal variant to a time_t (i64). FieldValue also implements
From<time_t>
so you can also use let t: time_t = fv.into();
to convert.
sourcepub fn ctx(self) -> ThreadSafeContext
pub fn ctx(self) -> ThreadSafeContext
Convert a ContextVal variant to a Context. FieldValue also implements
From<Context>
so you can also use let c: Context = fv.into();
to convert.
Trait Implementations§
source§impl Clone for ThreadSafeFieldValue
impl Clone for ThreadSafeFieldValue
source§fn clone(&self) -> ThreadSafeFieldValue
fn clone(&self) -> ThreadSafeFieldValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more