pub struct PrimitiveDef {
pub name: String,
pub primitive_type: PrimitiveType,
pub length: Option<usize>,
pub null_value: Option<String>,
pub min_value: Option<String>,
pub max_value: Option<String>,
pub character_encoding: Option<String>,
pub semantic_type: Option<String>,
pub description: Option<String>,
pub constant_value: Option<String>,
}Expand description
Primitive type definition.
Fields§
§name: StringType name.
primitive_type: PrimitiveTypeUnderlying primitive type.
length: Option<usize>Array length (None for scalar).
null_value: Option<String>Null value representation.
min_value: Option<String>Minimum valid value.
max_value: Option<String>Maximum valid value.
character_encoding: Option<String>Character encoding (for char arrays).
semantic_type: Option<String>Semantic type.
description: Option<String>Description.
constant_value: Option<String>Constant value (if presence is constant).
Implementations§
Source§impl PrimitiveDef
impl PrimitiveDef
Sourcepub fn new(name: String, primitive_type: PrimitiveType) -> Self
pub fn new(name: String, primitive_type: PrimitiveType) -> Self
Creates a new primitive type definition.
Sourcepub fn encoded_length(&self) -> usize
pub fn encoded_length(&self) -> usize
Returns the encoded length in bytes.
Trait Implementations§
Source§impl Clone for PrimitiveDef
impl Clone for PrimitiveDef
Source§fn clone(&self) -> PrimitiveDef
fn clone(&self) -> PrimitiveDef
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 moreAuto Trait Implementations§
impl Freeze for PrimitiveDef
impl RefUnwindSafe for PrimitiveDef
impl Send for PrimitiveDef
impl Sync for PrimitiveDef
impl Unpin for PrimitiveDef
impl UnwindSafe for PrimitiveDef
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