datex-core 0.0.14

The DATEX Core Rust implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use core::hash::Hasher;

use crate::{traits::datex_hash::DatexHash, values::core_value::CoreValue};

impl<T> DatexHash for Option<T>
where
    T: DatexHash,
{
    fn datex_hash(&self, mut state: &mut dyn Hasher) {
        match self {
            Some(value) => {
                value.datex_hash(&mut state);
            }
            None => CoreValue::Null.datex_hash(&mut state),
        }
    }
}