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 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 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
Mutably borrows from an owned value. Read more
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