#[repr(i32)]pub enum CapeValueType {
String = 0,
Integer = 1,
Boolean = 2,
Real = 3,
Empty = 4,
}Expand description
CapeValue data types
The supported types of CapeValue values.
Variants§
Implementations§
Source§impl CapeValueType
impl CapeValueType
Sourcepub fn from(value: i32) -> Option<CapeValueType>
pub fn from(value: i32) -> Option<CapeValueType>
convert from i32 to CapeValueType
§Arguments
value- i32 value to be converted to CapeValueType
§Examples
use cobia;
let v0=cobia::CapeValueType::from(0);
assert_eq!(v0.unwrap(),cobia::CapeValueType::String);
let v1=cobia::CapeValueType::from(1);
assert_eq!(v1.unwrap(),cobia::CapeValueType::Integer);
let v2=cobia::CapeValueType::from(2);
assert_eq!(v2.unwrap(),cobia::CapeValueType::Boolean);
let v3=cobia::CapeValueType::from(3);
assert_eq!(v3.unwrap(),cobia::CapeValueType::Real);
let v4=cobia::CapeValueType::from(4);
assert_eq!(v4.unwrap(),cobia::CapeValueType::Empty);
let v5=cobia::CapeValueType::from(-1);
assert_eq!(v5,None);Sourcepub fn iter() -> CapeValueTypeIterator ⓘ
pub fn iter() -> CapeValueTypeIterator ⓘ
get an iterator
§Examples
use cobia;
for capeValueType in cobia::CapeValueType::iter() {
println!("{}={}",capeValueType,capeValueType as i32);
}Trait Implementations§
Source§impl Clone for CapeValueType
impl Clone for CapeValueType
Source§fn clone(&self) -> CapeValueType
fn clone(&self) -> CapeValueType
Returns a duplicate 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 CapeValueType
impl Debug for CapeValueType
Source§impl Display for CapeValueType
impl Display for CapeValueType
Source§impl PartialEq for CapeValueType
impl PartialEq for CapeValueType
impl Copy for CapeValueType
impl Eq for CapeValueType
impl StructuralPartialEq for CapeValueType
Auto Trait Implementations§
impl Freeze for CapeValueType
impl RefUnwindSafe for CapeValueType
impl Send for CapeValueType
impl Sync for CapeValueType
impl Unpin for CapeValueType
impl UnwindSafe for CapeValueType
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