-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81d6ea1
commit 96d30e6
Showing
22 changed files
with
368 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
//! A conversion event | ||
use std::collections::HashMap; | ||
|
||
/// A conversion event | ||
#[derive(Debug)] | ||
pub struct Conversion { | ||
event_key: String, | ||
event_id: String, | ||
properties: HashMap<String, String>, | ||
tags: HashMap<String, String>, | ||
} | ||
|
||
impl Conversion { | ||
pub(crate) fn new<T: Into<String>>( | ||
event_key: T, event_id: T, properties: HashMap<String, String>, tags: HashMap<String, String>, | ||
) -> Conversion { | ||
Conversion { | ||
event_key: event_key.into(), | ||
event_id: event_id.into(), | ||
properties, | ||
tags, | ||
} | ||
} | ||
} | ||
|
||
impl Conversion { | ||
/// Get key | ||
pub fn event_key(&self) -> &str { | ||
&self.event_key | ||
} | ||
|
||
/// Get id | ||
pub fn event_id(&self) -> &str { | ||
&self.event_id | ||
} | ||
|
||
/// Get properties | ||
pub fn properties(&self) -> &HashMap<String, String> { | ||
&self.properties | ||
} | ||
|
||
/// Get tags | ||
pub fn tags(&self) -> &HashMap<String, String> { | ||
&self.tags | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ impl Event { | |
} | ||
|
||
/// Getter for `id` field | ||
#[allow(dead_code)] | ||
pub fn id(&self) -> &str { | ||
&self.id | ||
} | ||
|
Oops, something went wrong.