Skip to content

Instantly share code, notes, and snippets.

@rrichardson
Created December 22, 2017 21:58
Show Gist options
  • Save rrichardson/f64aa0ae1f0f42e24c73cfefd78b3775 to your computer and use it in GitHub Desktop.
Save rrichardson/f64aa0ae1f0f42e24c73cfefd78b3775 to your computer and use it in GitHub Desktop.
impl Serialize for PlatformNotification {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer
{
use self::PlatformNotification::*;
match self {
&Apn(ref apn, _) => apn.serialize(serializer),
&Gcm(ref gcm, _) => gcm.serialize(serializer),
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment