Record

Enum Record 

Source
pub enum Record {
    Normal(u16),
    Interpolated(u16),
    Error(u16),
    Neg(u16),
    Scope(u16),
}

Variants§

§

Normal(u16)

§

Interpolated(u16)

§

Error(u16)

§

Neg(u16)

§

Scope(u16)

Implementations§

Source§

impl Record

Source

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§

Source§

impl Debug for Record

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.