27 lines
598 B
Rust
27 lines
598 B
Rust
#[derive(Debug, Default)]
|
|
pub struct SubdomainInfo<'a> {
|
|
pub host: &'a str,
|
|
pub after_first_dot: &'a str,
|
|
pub before_first_dot: &'a str,
|
|
pub base_domain: &'a str,
|
|
pub sub_domain: Option<&'a str>,
|
|
}
|
|
|
|
impl<'a> SubdomainInfo<'a> {
|
|
pub fn new(
|
|
host: &'a str,
|
|
after_first_dot: &'a str,
|
|
before_first_dot: &'a str,
|
|
base_domain: &'a str,
|
|
sub_domain: Option<&'a str>,
|
|
) -> Self {
|
|
Self {
|
|
host,
|
|
after_first_dot,
|
|
before_first_dot,
|
|
base_domain,
|
|
sub_domain,
|
|
}
|
|
}
|
|
}
|