lib

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

resource_area.rs (1114B)


      1 #![forbid(unsafe_code)]
      2 
      3 use crate::farm::RadrootsGcsLocation;
      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 RadrootsResourceArea {
     12     pub d_tag: String,
     13     pub name: String,
     14     pub about: Option<String>,
     15     pub location: RadrootsResourceAreaLocation,
     16     pub tags: Option<Vec<String>>,
     17 }
     18 
     19 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))]
     20 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
     21 #[derive(Clone, Debug)]
     22 pub struct RadrootsResourceAreaRef {
     23     pub pubkey: String,
     24     pub d_tag: String,
     25 }
     26 
     27 #[cfg_attr(feature = "dto-bindgen", derive(dto_bindgen::Dto))]
     28 #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
     29 #[derive(Clone, Debug)]
     30 pub struct RadrootsResourceAreaLocation {
     31     pub primary: Option<String>,
     32     pub city: Option<String>,
     33     pub region: Option<String>,
     34     pub country: Option<String>,
     35     pub gcs: RadrootsGcsLocation,
     36 }