From a17f3129a3d297d5ad2e61115c94cdf85c0ae950 Mon Sep 17 00:00:00 2001 From: P0lunin Date: Tue, 3 Sep 2019 21:14:19 +0300 Subject: [PATCH] add struct --- src/core/types/contact.rs | 3 +++ src/core/types/location.rs | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 src/core/types/location.rs diff --git a/src/core/types/contact.rs b/src/core/types/contact.rs index f6896481..c2756245 100644 --- a/src/core/types/contact.rs +++ b/src/core/types/contact.rs @@ -1,3 +1,6 @@ +use serde::Deserialization; + +#[derive(Debug, Deserialization)] struct Contact { phone_number: String, first_name: String, diff --git a/src/core/types/location.rs b/src/core/types/location.rs new file mode 100644 index 00000000..34dcda51 --- /dev/null +++ b/src/core/types/location.rs @@ -0,0 +1,7 @@ +use serde::{Serialization, Deserialization}; + +#[derive(Debug, Serialization, Deserialization)] +struct Location { + longitude: f64, + latitude: f64, +} \ No newline at end of file