pub enum Record {
Normal(u16),
Interpolated(u16),
Error(u16),
Neg(u16),
Scope(u16),
}Variants§
Implementations§
Source§impl Record
impl Record
Sourcepub fn default_f32(&self, precision: u8) -> f32
pub fn default_f32(&self, precision: u8) -> f32
Examples found in repository?
examples/simple.rs (line 23)
5fn main() {
6 let paths = fs::read_dir("./").unwrap();
7
8 for path in paths {
9 println!("Name: {}", path.unwrap().path().display())
10 }
11
12 let file =
13 read("./dwd-dl/crates/radolan/tests/api/files/raa01-yw2017.002_10000-2301010525-dwd---bin")
14 .expect("File not found");
15
16 // create a new radolan file from byte array
17 let radolan_file = Radolan::new(&file).unwrap();
18
19 let row = 0;
20 let column = 0;
21 let point = radolan_file.get_point(row, column).unwrap();
22
23 let value = point.default_f32(radolan_file.header().precision);
24 let time = radolan_file.header().datetime;
25 println!("time: {time}, row: {row}, column: {column}, value: {value}");
26}Trait Implementations§
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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