Skip to content

Instantly share code, notes, and snippets.

@Bradysm
Created August 9, 2020 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bradysm/f3cfa7cec377fc024be6f7b962db4915 to your computer and use it in GitHub Desktop.
Save Bradysm/f3cfa7cec377fc024be6f7b962db4915 to your computer and use it in GitHub Desktop.
/**
Protocol used to define services that can send messages
*/
protocol MessageSendable {
/// prototype of messaging function that must be defined within a module
/// that conforms to this protocol
func sendMessage(username: String, message: String, completion: @escaping (Result<String, Error>) -> Void);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment