pub fn check_subscription_exists(&self, sub_id: &String) -> Result<()> {
    match self.subscriptions.contains_key(sub_id) {
      true => Ok(()),
      false => Err(ErrorKind::SubscriptionNotFound(sub_id.to_string()).into()),
    }
  }
/// Check if subscription exists, otherwise return error
Check if subscription exists, otherwise return error
Check if subscription exists otherwise return error
pub fn check_subscription_exists(&self, sub_id: &String) -> Result<()> {
    match self.subscriptions.contains_key(sub_id) {
      true => Ok(()),
      false => Err(ErrorKind::SubscriptionNotFound(sub_id.to_string()).into()),
    }
  }
pub fn check_subscription_exists ( & self , sub_id : & String ) -> Result < ( ) > { match self . subscriptions . contains_key ( sub_id ) { true => Ok ( ( ) ) , false => Err ( ErrorKind :: SubscriptionNotFound ( sub_id . to_string ( ) ) . into ( ) ) , } }
Check if subscription exists, otherwise return error
Check if subscription exists otherwise return error
&self
sub_id
&String
&self
sub_id
&String