lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README | LICENSE

message.rs (750B)


      1 #![forbid(unsafe_code)]
      2 
      3 use crate::RadrootsNostrEventPtr;
      4 
      5 #[cfg(not(feature = "std"))]
      6 use alloc::{string::String, vec::Vec};
      7 
      8 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))]
      9 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
     10 #[derive(Clone, Debug)]
     11 pub struct RadrootsMessage {
     12     pub recipients: Vec<RadrootsMessageRecipient>,
     13     pub content: String,
     14     pub reply_to: Option<RadrootsNostrEventPtr>,
     15     pub subject: Option<String>,
     16 }
     17 
     18 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))]
     19 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
     20 #[derive(Clone, Debug)]
     21 pub struct RadrootsMessageRecipient {
     22     pub public_key: String,
     23     pub relay_url: Option<String>,
     24 }