implemented Hash for all types
This commit is contained in:
parent
e6f0b18361
commit
de9f2f626f
@ -20,7 +20,7 @@ pub struct DataInfo {
|
||||
pub bit: Option<u32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum SPSDataTypes {
|
||||
Boolean(BooleanType),
|
||||
Int(IntType),
|
||||
@ -133,7 +133,7 @@ pub struct SQLDataType {
|
||||
pub mysql_type: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct BitPosition {
|
||||
pub byte: u32,
|
||||
pub bit: Option<u32>,
|
||||
|
@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::super::errors::*;
|
||||
use super::super::sps_datatypes::{BitPosition, DataEvaluation, UnparsedSPSDataType};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct BooleanType {
|
||||
position: BitPosition,
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::super::errors::*;
|
||||
use super::super::sps_datatypes::{BitPosition, DataEvaluation, UnparsedSPSDataType};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct DateTimeType {
|
||||
length: u32,
|
||||
position: BitPosition,
|
||||
|
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::super::errors::*;
|
||||
use super::super::sps_datatypes::{BitPosition, DataEvaluation, UnparsedSPSDataType};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct DIntType {
|
||||
length: u32,
|
||||
position: BitPosition,
|
||||
|
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::super::errors::*;
|
||||
use super::super::sps_datatypes::{BitPosition, DataEvaluation, UnparsedSPSDataType};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct IntType {
|
||||
length: u32,
|
||||
position: BitPosition,
|
||||
|
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::super::errors::*;
|
||||
use super::super::sps_datatypes::{BitPosition, DataEvaluation, UnparsedSPSDataType};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct RealType {
|
||||
length: u32,
|
||||
position: BitPosition,
|
||||
|
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::super::errors::*;
|
||||
use super::super::sps_datatypes::{BitPosition, DataEvaluation, UnparsedSPSDataType};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct StringType {
|
||||
length: u32,
|
||||
position: BitPosition,
|
||||
|
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::super::errors::*;
|
||||
use super::super::sps_datatypes::{BitPosition, DataEvaluation, UnparsedSPSDataType};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct TimeType {
|
||||
length: u32,
|
||||
position: BitPosition,
|
||||
|
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::super::errors::*;
|
||||
use super::super::sps_datatypes::{BitPosition, DataEvaluation, UnparsedSPSDataType};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct UDIntType {
|
||||
length: u32,
|
||||
position: BitPosition,
|
||||
|
@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
use super::super::errors::*;
|
||||
use super::super::sps_datatypes::{BitPosition, DataEvaluation, UnparsedSPSDataType};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct UIntType {
|
||||
length: u32,
|
||||
position: BitPosition,
|
||||
|
Loading…
Reference in New Issue
Block a user