pub struct ReadStatVarMetadata {
pub var_name: String,
pub var_type: ReadStatVarType,
pub var_type_class: ReadStatVarTypeClass,
pub var_label: String,
pub var_format: String,
pub var_format_class: Option<ReadStatVarFormatClass>,
pub storage_width: usize,
pub display_width: i32,
}Expand description
Metadata for a single variable (column) in a SAS dataset.
Fields§
§var_name: StringVariable name as defined in the SAS file.
var_type: ReadStatVarTypeStorage type of the variable.
var_type_class: ReadStatVarTypeClassHigh-level type class (string or numeric).
var_label: StringUser-assigned variable label (may be empty).
var_format: StringSAS format string (e.g. "DATE9", "BEST12").
var_format_class: Option<ReadStatVarFormatClass>Semantic format class derived from the format string, if date/time-related.
storage_width: usizeNumber of bytes used to store the variable value. Always 8 for SAS numeric variables; variable for strings.
display_width: i32Display width hint from the file. 0 for sas7bdat; populated for XPORT/SPSS.
Implementations§
Source§impl ReadStatVarMetadata
impl ReadStatVarMetadata
Sourcepub fn new(
var_name: String,
var_type: ReadStatVarType,
var_type_class: ReadStatVarTypeClass,
var_label: String,
var_format: String,
var_format_class: Option<ReadStatVarFormatClass>,
storage_width: usize,
display_width: i32,
) -> Self
pub fn new( var_name: String, var_type: ReadStatVarType, var_type_class: ReadStatVarTypeClass, var_label: String, var_format: String, var_format_class: Option<ReadStatVarFormatClass>, storage_width: usize, display_width: i32, ) -> Self
Creates a new ReadStatVarMetadata with the given field values.
Trait Implementations§
Source§impl Clone for ReadStatVarMetadata
impl Clone for ReadStatVarMetadata
Source§fn clone(&self) -> ReadStatVarMetadata
fn clone(&self) -> ReadStatVarMetadata
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 ReadStatVarMetadata
impl Debug for ReadStatVarMetadata
Auto Trait Implementations§
impl Freeze for ReadStatVarMetadata
impl RefUnwindSafe for ReadStatVarMetadata
impl Send for ReadStatVarMetadata
impl Sync for ReadStatVarMetadata
impl Unpin for ReadStatVarMetadata
impl UnwindSafe for ReadStatVarMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more