pub enum ZoneFile {
V0 {
owner: String,
general: String,
twitter: String,
url: String,
nostr: String,
lightning: String,
btc: String,
subdomains: HashMap<String, SubDomain>,
},
V1 {
default: Option<String>,
id: Option<Id>,
resources: Option<HashMap<String, Resource>>,
wallets: Option<HashMap<WalletType, String>>,
dns: Option<Dns>,
},
}
Variants§
Implementations§
Source§impl ZoneFile
impl ZoneFile
Sourcepub fn new_v0(
owner: String,
general: String,
twitter: String,
url: String,
nostr: String,
lightning: String,
btc: String,
subdomains: HashMap<String, SubDomain>,
) -> Self
pub fn new_v0( owner: String, general: String, twitter: String, url: String, nostr: String, lightning: String, btc: String, subdomains: HashMap<String, SubDomain>, ) -> Self
Create a new V0 zonefile
Sourcepub fn from_clarity_buffer_hex_string(hex_string: &str) -> Result<Self, Error>
pub fn from_clarity_buffer_hex_string(hex_string: &str) -> Result<Self, Error>
Parse a zonefile from a Clarity Buffer Hex String
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ZoneFile
impl<'de> Deserialize<'de> for ZoneFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ZoneFile
impl RefUnwindSafe for ZoneFile
impl Send for ZoneFile
impl Sync for ZoneFile
impl Unpin for ZoneFile
impl UnwindSafe for ZoneFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more