pub enum AttributeValueType {
Int {
min: i64,
max: i64,
},
Hex {
min: i64,
max: i64,
},
Float {
min: f64,
max: f64,
},
String,
Enum {
values: Vec<String<{ MAX_NAME_SIZE }>, { crate::MAX_ATTRIBUTE_ENUM_VALUES }>,
},
}Expand description
Attribute value type specification from BA_DEF_.
Defines the type and constraints for an attribute’s values.
Variants§
Int
Integer type with min/max range: INT min max
Hex
Hexadecimal integer type with min/max range: HEX min max
Float
Float type with min/max range: FLOAT min max
String
String type: STRING
Enum
Enumeration type: ENUM "val1","val2",...
Fields
§
values: Vec<String<{ MAX_NAME_SIZE }>, { crate::MAX_ATTRIBUTE_ENUM_VALUES }>List of valid enum values
Implementations§
Source§impl AttributeValueType
impl AttributeValueType
Sourcepub fn enum_values(
&self,
) -> Option<&Vec<String<{ MAX_NAME_SIZE }>, { crate::MAX_ATTRIBUTE_ENUM_VALUES }>>
pub fn enum_values( &self, ) -> Option<&Vec<String<{ MAX_NAME_SIZE }>, { crate::MAX_ATTRIBUTE_ENUM_VALUES }>>
Returns the enum values if this is an enum type.
Sourcepub fn int_range(&self) -> Option<(i64, i64)>
pub fn int_range(&self) -> Option<(i64, i64)>
Returns the integer range if this is an INT or HEX type.
Sourcepub fn float_range(&self) -> Option<(f64, f64)>
pub fn float_range(&self) -> Option<(f64, f64)>
Returns the float range if this is a FLOAT type.
Trait Implementations§
Source§impl Clone for AttributeValueType
impl Clone for AttributeValueType
Source§fn clone(&self) -> AttributeValueType
fn clone(&self) -> AttributeValueType
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 AttributeValueType
impl Debug for AttributeValueType
Source§impl Display for AttributeValueType
impl Display for AttributeValueType
Source§impl PartialEq for AttributeValueType
impl PartialEq for AttributeValueType
impl StructuralPartialEq for AttributeValueType
Auto Trait Implementations§
impl Freeze for AttributeValueType
impl RefUnwindSafe for AttributeValueType
impl Send for AttributeValueType
impl Sync for AttributeValueType
impl Unpin for AttributeValueType
impl UnwindSafe for AttributeValueType
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