derive_record_name

Function derive_record_name 

Source
pub fn derive_record_name(host: &str, zone: &str) -> Result<String>
Expand description

Derives the DNS record name from a hostname and zone.

  • host.zonehost (e.g. "app.example.com" + "example.com""app")
  • zone (apex) → "@"
  • deep.sub.zone"deep.sub"

Trailing dots on host are stripped before comparison.

§Errors

Returns an error if host does not end with the zone suffix.