add initial client tests (#25)

This commit is contained in:
João Oliveira
2020-04-06 04:57:45 +01:00
committed by GitHub
parent 83cdedf34f
commit e7f6a372f0
3 changed files with 96 additions and 1 deletions

View File

@@ -187,6 +187,11 @@ pub struct Subscriber {
impl Subscriber {
/// get the list of subscribed channels
pub fn get_subscribed(&self) -> &HashSet<String> {
&self.subscribed_channels
}
/// await for next message published on the subscribed channels
pub async fn next_message(&mut self) -> crate::Result<Message> {
match self.receive_message().await {