Function gtld_data::get_by_organization [] [src]

pub fn get_by_organization<'a, S: Into<String>>(organization: S) -> Vec<Gtld<'a>>

Retrieves all Gtlds defined by the gtld_data::all() method with an organization name equal to that of the organization passed.

Examples

Retrieve all Gtlds represented by the str "VeriSign Global Registry Services":

use gtld_data::get_by_organization;

let organization = "VeriSign Global Registry Services";
let gtld_data = get_by_organization(organization);

assert!(gtld_data.len() > 0);

Alternatively, pass a String of the organization name:

use gtld_data::get_by_organization;

let organization = String::from("VeriSign Global Registry Services");
let gtld_data = get_by_organization(organization);

assert!(gtld_data.len() > 0);