gcp-pubsub 0.1.0

A surf-based Google Cloud Platform PubSub client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::Topic;
use serde::Serialize;
use serde_derive::Deserialize;

#[derive(Deserialize, Serialize)]
pub struct CreateSubscription {
  pub topic: String,
}

impl CreateSubscription {
  pub fn from(topic: &Topic) -> Self {
    Self {
      topic: topic.name.to_owned(),
    }
  }
}