pub struct Domain {
pub id: usize,
pub created: usize,
pub owner: usize,
pub name: String,
pub tld: DomainTld,
pub data: Vec<(String, DomainData)>,
}Fields§
§id: usize§created: usize§owner: usize§name: String§tld: DomainTld§data: Vec<(String, DomainData)>Data about the domain. This can only be configured by the domain’s owner.
Maximum of 4 entries. Stored in a structure of (subdomain string, data).
Implementations§
Source§impl Domain
impl Domain
Sourcepub fn from_str(value: &str) -> (String, String, DomainTld, String)
pub fn from_str(value: &str) -> (String, String, DomainTld, String)
Get the domain’s subdomain, name, TLD, and path segments from a string.
If no subdomain is provided, the subdomain will be “@”. This means that domain data entries should use “@” as the root service.
Sourcepub fn http_assets(input: String) -> String
pub fn http_assets(input: String) -> String
Update an HTML/JS/CSS string with the correct URL for all “atto://” protocol requests.
This would not be needed if the JS custom protocol API wasn’t awful.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Domain
impl<'de> Deserialize<'de> for Domain
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 Domain
impl RefUnwindSafe for Domain
impl Send for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnwindSafe for Domain
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