Skip to content

Commit

Permalink
Cumulocity mapper using actors #1909
Browse files Browse the repository at this point in the history
  • Loading branch information
albinsuresh committed Apr 26, 2023
1 parent f732ba3 commit 77b9c4e
Show file tree
Hide file tree
Showing 25 changed files with 1,214 additions and 1,888 deletions.
8 changes: 7 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions crates/common/mqtt_channel/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ impl From<Publish> for Message {
}
}

impl<T, U> From<(T, U)> for Message
where
T: AsRef<str>,
U: AsRef<str>,
{
fn from(value: (T, U)) -> Self {
Message::new(&Topic::new_unchecked(value.0.as_ref()), value.1.as_ref())
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
Loading

0 comments on commit 77b9c4e

Please sign in to comment.