subject.rs 548 B

123456789101112131415161718192021222324252627
  1. use flowy_derive::ProtoBuf;
  2. #[derive(Debug, Clone, ProtoBuf)]
  3. pub struct ObservableSubject {
  4. #[pb(index = 1)]
  5. pub category: String,
  6. #[pb(index = 2)]
  7. pub ty: i32,
  8. #[pb(index = 3)]
  9. pub subject_id: String,
  10. #[pb(index = 4, one_of)]
  11. pub subject_payload: Option<Vec<u8>>,
  12. }
  13. impl std::default::Default for ObservableSubject {
  14. fn default() -> Self {
  15. Self {
  16. category: "".to_string(),
  17. ty: 0,
  18. subject_id: "".to_string(),
  19. subject_payload: None,
  20. }
  21. }
  22. }