Device Detection and IP Intelligence for the 51Degrees Pipeline, in Rust

enterprise.rs File Reference

Functions

pub fn is_available (name:&str, available:&[String]) -> bool
 Whether available holds name, ignoring case as property names do.
pub fn missing_properties< 'a > (wanted:&[&'a str], available:&[String]) -> Vec<&'a str >
 The names in wanted that available does not hold, in wanted's order.
pub fn enterprise_data_file_message (missing:&[&str], contact_url:&str) -> Option< String >
 The message an example prints once when the data file in use does not carry some of the properties it asks for. It names them and gives contact_url, the example's own link for asking about a copy of the Enterprise data file. None when nothing is missing.
fn join_names (names:&[&str]) -> String
 names as a list for a sentence, such as A, B and C.
fn available () -> Vec< String >
fn availability_ignores_case ()
fn missing_keeps_the_order_asked_for ()
fn nothing_missing_gives_no_message ()
fn the_message_names_each_property_and_the_link ()

Variables

pub const NEEDS_ENTERPRISE_DATA_FILE
 Printed in place of a value when the data file in use does not carry the property.
mod tests

Function Documentation

◆ availability_ignores_case()

fn availability_ignores_case ( )

◆ available()

fn available ( ) -> Vec< String >

◆ enterprise_data_file_message()

pub fn enterprise_data_file_message ( missing:& [&str],
contact_url:& str ) -> Option< String >

The message an example prints once when the data file in use does not carry some of the properties it asks for. It names them and gives contact_url, the example's own link for asking about a copy of the Enterprise data file. None when nothing is missing.

◆ is_available()

pub fn is_available ( name:& str,
available:& [String] ) -> bool

Whether available holds name, ignoring case as property names do.

◆ join_names()

fn join_names ( names:& [&str]) -> String

names as a list for a sentence, such as A, B and C.

◆ missing_keeps_the_order_asked_for()

fn missing_keeps_the_order_asked_for ( )

◆ missing_properties< 'a >()

pub fn missing_properties< 'a > ( wanted:& [& 'a str],
available:& [String] ) -> Vec<& 'a str >

The names in wanted that available does not hold, in wanted's order.

◆ nothing_missing_gives_no_message()

fn nothing_missing_gives_no_message ( )

◆ the_message_names_each_property_and_the_link()

fn the_message_names_each_property_and_the_link ( )

Variable Documentation

◆ NEEDS_ENTERPRISE_DATA_FILE

pub const NEEDS_ENTERPRISE_DATA_FILE

Printed in place of a value when the data file in use does not carry the property.

Name the properties an example asks for that the data file in use does not carry, and say where to ask about the Enterprise data file.

The on-premise examples run on the free data files and also ask for properties only the Enterprise data file has. Each example passes the property names its engine reports for the loaded data file, so a property the file does not carry is told apart from one the file carries but has no value for with the evidence given.

◆ tests

mod tests
Initial value:
{
use super::*