pub struct GribFile { /* private fields */ }Expand description
A GRIB file containing one or more logical fields.
Implementations§
Source§impl GribFile
impl GribFile
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
Open a GRIB file from disk using memory-mapped I/O.
Sourcepub fn open_with_options<P: AsRef<Path>>(
path: P,
options: OpenOptions,
) -> Result<Self>
pub fn open_with_options<P: AsRef<Path>>( path: P, options: OpenOptions, ) -> Result<Self>
Open a GRIB file from disk using explicit decoder options.
Sourcepub fn open_with_local_parameters<P: AsRef<Path>>(
path: P,
options: OpenOptions,
local_parameters: &[LocalParameterEntry<'_>],
) -> Result<Self>
pub fn open_with_local_parameters<P: AsRef<Path>>( path: P, options: OpenOptions, local_parameters: &[LocalParameterEntry<'_>], ) -> Result<Self>
Open a GRIB file from disk using explicit decoder options and local table entries.
Sourcepub fn open_with_grib1_predefined_bitmaps<P: AsRef<Path>>(
path: P,
options: OpenOptions,
predefined_bitmaps: &[PredefinedBitmap<'_>],
) -> Result<Self>
pub fn open_with_grib1_predefined_bitmaps<P: AsRef<Path>>( path: P, options: OpenOptions, predefined_bitmaps: &[PredefinedBitmap<'_>], ) -> Result<Self>
Open a GRIB file from disk using caller-supplied GRIB1 predefined bitmaps.
Sourcepub fn open_with_local_parameters_and_grib1_predefined_bitmaps<P: AsRef<Path>>(
path: P,
options: OpenOptions,
local_parameters: &[LocalParameterEntry<'_>],
predefined_bitmaps: &[PredefinedBitmap<'_>],
) -> Result<Self>
pub fn open_with_local_parameters_and_grib1_predefined_bitmaps<P: AsRef<Path>>( path: P, options: OpenOptions, local_parameters: &[LocalParameterEntry<'_>], predefined_bitmaps: &[PredefinedBitmap<'_>], ) -> Result<Self>
Open a GRIB file from disk using GRIB2 local parameters and GRIB1 predefined bitmaps.
Sourcepub fn from_bytes(data: Vec<u8>) -> Result<Self>
pub fn from_bytes(data: Vec<u8>) -> Result<Self>
Open a GRIB file from an owned byte buffer.
Sourcepub fn from_bytes_with_options(
data: Vec<u8>,
options: OpenOptions,
) -> Result<Self>
pub fn from_bytes_with_options( data: Vec<u8>, options: OpenOptions, ) -> Result<Self>
Open a GRIB file from an owned byte buffer using explicit decoder options.
Sourcepub fn from_bytes_with_local_parameters(
data: Vec<u8>,
options: OpenOptions,
local_parameters: &[LocalParameterEntry<'_>],
) -> Result<Self>
pub fn from_bytes_with_local_parameters( data: Vec<u8>, options: OpenOptions, local_parameters: &[LocalParameterEntry<'_>], ) -> Result<Self>
Open a GRIB file from bytes using explicit decoder options and local table entries.
Sourcepub fn from_bytes_with_grib1_predefined_bitmaps(
data: Vec<u8>,
options: OpenOptions,
predefined_bitmaps: &[PredefinedBitmap<'_>],
) -> Result<Self>
pub fn from_bytes_with_grib1_predefined_bitmaps( data: Vec<u8>, options: OpenOptions, predefined_bitmaps: &[PredefinedBitmap<'_>], ) -> Result<Self>
Open a GRIB file from bytes using caller-supplied GRIB1 predefined bitmaps.
Sourcepub fn from_bytes_with_local_parameters_and_grib1_predefined_bitmaps(
data: Vec<u8>,
options: OpenOptions,
local_parameters: &[LocalParameterEntry<'_>],
predefined_bitmaps: &[PredefinedBitmap<'_>],
) -> Result<Self>
pub fn from_bytes_with_local_parameters_and_grib1_predefined_bitmaps( data: Vec<u8>, options: OpenOptions, local_parameters: &[LocalParameterEntry<'_>], predefined_bitmaps: &[PredefinedBitmap<'_>], ) -> Result<Self>
Open a GRIB file from bytes using GRIB2 local parameters and GRIB1 predefined bitmaps.
Sourcepub fn message_count(&self) -> usize
pub fn message_count(&self) -> usize
Returns the number of logical fields in the file.
Sourcepub fn messages(&self) -> MessageIter<'_> ⓘ
pub fn messages(&self) -> MessageIter<'_> ⓘ
Iterate over all fields.
Auto Trait Implementations§
impl Freeze for GribFile
impl RefUnwindSafe for GribFile
impl Send for GribFile
impl Sync for GribFile
impl Unpin for GribFile
impl UnsafeUnpin for GribFile
impl UnwindSafe for GribFile
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
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>
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>
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