pub struct ColumnSpec {
pub dimension: LasDimension,
pub scalar: ScalarType,
pub byte_width: Option<usize>,
}Expand description
Declares the LAS/COPC dimension and scalar type for a column.
Fields§
§dimension: LasDimension§scalar: ScalarType§byte_width: Option<usize>For LasDimension::ExtraBytes, the fixed byte count stored for each point.
Implementations§
Source§impl ColumnSpec
impl ColumnSpec
pub const fn new(dimension: LasDimension, scalar: ScalarType) -> Self
pub const fn extra_bytes(byte_width: usize) -> Self
Sourcepub const fn default_for(dimension: LasDimension) -> Option<Self>
pub const fn default_for(dimension: LasDimension) -> Option<Self>
Returns the default fixed LAS/COPC scalar for dimension, when it has one.
Sourcepub const fn has_default_scalar(self) -> bool
pub const fn has_default_scalar(self) -> bool
Returns whether this specification has the canonical scalar for its dimension.
Sourcepub const fn matches_data(self, data: &ColumnData) -> bool
pub const fn matches_data(self, data: &ColumnData) -> bool
Returns whether data has the scalar type declared by this spec.
Sourcepub fn validate_data(self, data: &ColumnData) -> Result<()>
pub fn validate_data(self, data: &ColumnData) -> Result<()>
Validate the declared scalar against the supplied data.
Sourcepub fn validate_default_scalar(self) -> Result<()>
pub fn validate_default_scalar(self) -> Result<()>
Validate that this spec uses the fixed LAS/COPC scalar for its dimension.
pub fn extra_byte_width(self) -> Option<usize>
pub fn point_count_for_data(self, data: &ColumnData) -> Result<usize>
Trait Implementations§
Source§impl Clone for ColumnSpec
impl Clone for ColumnSpec
Source§fn clone(&self) -> ColumnSpec
fn clone(&self) -> ColumnSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ColumnSpec
Source§impl Debug for ColumnSpec
impl Debug for ColumnSpec
impl Eq for ColumnSpec
Source§impl Hash for ColumnSpec
impl Hash for ColumnSpec
Source§impl PartialEq for ColumnSpec
impl PartialEq for ColumnSpec
Source§fn eq(&self, other: &ColumnSpec) -> bool
fn eq(&self, other: &ColumnSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ColumnSpec
Auto Trait Implementations§
impl Freeze for ColumnSpec
impl RefUnwindSafe for ColumnSpec
impl Send for ColumnSpec
impl Sync for ColumnSpec
impl Unpin for ColumnSpec
impl UnsafeUnpin for ColumnSpec
impl UnwindSafe for ColumnSpec
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