lib.rs (1867B)
1 #![cfg_attr(not(feature = "std"), no_std)] 2 #![forbid(unsafe_code)] 3 #[cfg(not(feature = "std"))] 4 extern crate alloc; 5 6 #[cfg(not(feature = "std"))] 7 use alloc::{string::String, vec::Vec}; 8 9 pub mod account; 10 pub mod app_data; 11 pub mod article; 12 pub mod calendar; 13 pub mod comment; 14 pub mod contract; 15 pub mod coop; 16 pub mod document; 17 pub mod draft; 18 #[cfg(feature = "dto-bindgen")] 19 pub mod dto; 20 pub mod event_head; 21 pub mod farm; 22 pub mod farm_crdt; 23 pub mod farm_file; 24 pub mod farm_workspace; 25 pub mod file_metadata; 26 pub mod follow; 27 pub mod geochat; 28 pub mod gift_wrap; 29 pub mod group; 30 pub mod http_auth; 31 pub mod ids; 32 pub mod job; 33 pub mod job_feedback; 34 pub mod job_request; 35 pub mod job_result; 36 pub mod kinds; 37 pub mod list; 38 pub mod list_set; 39 pub mod listing; 40 pub mod message; 41 pub mod message_file; 42 pub mod order; 43 pub mod order_economics; 44 pub mod plot; 45 pub mod post; 46 pub mod profile; 47 pub mod reaction; 48 pub mod relay_auth; 49 pub mod relay_document; 50 pub mod report; 51 pub mod repost; 52 pub mod resource_area; 53 pub mod resource_cap; 54 pub mod seal; 55 pub mod social; 56 pub mod tags; 57 pub mod trade_validation; 58 59 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 60 #[derive(Clone, Debug, PartialEq, Eq)] 61 pub struct RadrootsNostrEvent { 62 pub id: String, 63 pub author: String, 64 pub created_at: u32, 65 pub kind: u32, 66 pub tags: Vec<Vec<String>>, 67 pub content: String, 68 pub sig: String, 69 } 70 71 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 72 #[derive(Clone, Debug)] 73 pub struct RadrootsNostrEventRef { 74 pub id: String, 75 pub author: String, 76 pub kind: u32, 77 pub d_tag: Option<String>, 78 pub relays: Option<Vec<String>>, 79 } 80 81 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 82 #[derive(Clone, Debug, PartialEq, Eq)] 83 pub struct RadrootsNostrEventPtr { 84 pub id: String, 85 pub relays: Option<String>, 86 }