#[non_exhaustive]pub enum DataRepresentation {
SimplePacking(ScaledPackingParams),
Grib1SecondOrderPacking(Grib1SecondOrderPackingParams),
ComplexPacking(ComplexPackingParams),
IeeePacking(IeeePackingParams),
Jpeg2000Packing(Jpeg2000PackingParams),
PngPacking(PngPackingParams),
CcsdsPacking(CcsdsPackingParams),
RunLengthPacking(RunLengthPackingParams),
Unsupported(u16),
}Expand description
GRIB data representation and validated packing parameters.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SimplePacking(ScaledPackingParams)
Template 5.0: Simple packing.
Grib1SecondOrderPacking(Grib1SecondOrderPackingParams)
GRIB1 grid-point second-order packing.
GRIB1 stores this layout in Binary Data Section flags rather than a GRIB2 data representation template.
ComplexPacking(ComplexPackingParams)
Template 5.2/5.3: Complex packing with optional spatial differencing.
IeeePacking(IeeePackingParams)
Template 5.4: IEEE floating-point values.
Jpeg2000Packing(Jpeg2000PackingParams)
Template 5.40: JPEG 2000 code stream packing.
PngPacking(PngPackingParams)
Template 5.41: PNG image packing.
CcsdsPacking(CcsdsPackingParams)
Template 5.42: CCSDS 121.0 adaptive entropy coding.
RunLengthPacking(RunLengthPackingParams)
Template 5.200: Run-length packing with predefined level values.
Unsupported(u16)
Unsupported template.
Implementations§
Source§impl DataRepresentation
impl DataRepresentation
Sourcepub const fn template_number(&self) -> u16
pub const fn template_number(&self) -> u16
Returns the GRIB2 template number or a diagnostic identifier for a GRIB1 representation.
pub fn parse(section_bytes: &[u8]) -> Result<DataRepresentation, Error>
pub fn encoded_values(&self) -> Option<usize>
Trait Implementations§
Source§impl Clone for DataRepresentation
impl Clone for DataRepresentation
Source§fn clone(&self) -> DataRepresentation
fn clone(&self) -> DataRepresentation
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 moreSource§impl Debug for DataRepresentation
impl Debug for DataRepresentation
Source§impl PartialEq for DataRepresentation
impl PartialEq for DataRepresentation
impl StructuralPartialEq for DataRepresentation
Auto Trait Implementations§
impl Freeze for DataRepresentation
impl RefUnwindSafe for DataRepresentation
impl Send for DataRepresentation
impl Sync for DataRepresentation
impl Unpin for DataRepresentation
impl UnsafeUnpin for DataRepresentation
impl UnwindSafe for DataRepresentation
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