Skip to main content

find_value

Function find_value 

Source
pub async fn find_value(
    client: &Client,
    zone: &Zone,
    name: &str,
    record_type: &str,
    selector: &ValueSelector,
) -> Result<(RecordSet, RecordValue)>
Expand description

The group and the one value selector points at.

§Errors

Error::NotFound if the group does not exist or has no such value; the message lists the existing values.

§Examples

use dinio_sdk::ops::{self, ValueSelector};

// Data is matched the way Core stores it: this finds "target.example.com.".
let selector = ValueSelector::Data("Target.Example.com".into());
let (group, value) =
    ops::find_value(client, zone, "www.example.com", "CNAME", &selector).await?;
println!("{} (TTL {}) is {}", value.data, group.ttl, value.uuid);