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

data_file_check.rs File Reference

Classes

struct  FakeOnPremiseEngine

Functions

if let Some (published)
if is_limited_data_tier (tier)
warnings fn is_limited_data_tier (tier:&str) -> bool
 Whether tier names a free, limited-accuracy data file that the examples should flag.
pub fn data_file_info (engine:&dyn OnPremiseAspectEngine) -> String
 A short, single-line summary of the data file engine is using, suitable for an informational log line before any warnings.
struct FakeOnPremiseEngine new (tier:&str, published:Option< DateTime< Utc > >) -> Self

Variables

pub const DATA_FILE_AGE_WARNING_DAYS
 A data file older than this many days triggers the age warning.
const PRICING_URL_AGE
 The pricing page, as the out-of-date warning links it.
mod tests
tier __pad0__
tier filter
 Vec< PropertyMetaData >
aspect_properties __pad1__
aspect_properties files

Function Documentation

◆ data_file_info()

pub fn data_file_info ( engine:&dyn OnPremiseAspectEngine) -> String

A short, single-line summary of the data file engine is using, suitable for an informational log line before any warnings.

Reports the tier and, when known, the publish date.

◆ is_limited_data_tier() [1/2]

if is_limited_data_tier ( tier )

◆ is_limited_data_tier() [2/2]

warnings fn is_limited_data_tier ( tier:& str) -> bool

Whether tier names a free, limited-accuracy data file that the examples should flag.

This covers the Device Detection Lite tier and the two free IP Intelligence files, whose data-set names carry Asn or Lite, for example IPIV4Asn and IPIV4Lite. All are illustration-only, in contrast to the paid Enterprise and TAC files.

◆ new()

struct FakeOnPremiseEngine new ( tier:& str,
published:Option< DateTime< Utc > >  ) -> Self

◆ Some()

if let Some ( published )

Variable Documentation

◆ __pad0__

tier __pad0__

◆ __pad1__

aspect_properties __pad1__

◆ DATA_FILE_AGE_WARNING_DAYS

pub const DATA_FILE_AGE_WARNING_DAYS

A data file older than this many days triggers the age warning.

The threshold is 30 days, which stays well within the 28-day bound the warning must honour.

◆ files

aspect_properties files

◆ filter

tier filter

◆ PRICING_URL_AGE

const PRICING_URL_AGE

The pricing page, as the out-of-date warning links it.

◆ tests

mod tests
Initial value:
{
use super::*

◆ Vec< PropertyMetaData >

Vec< PropertyMetaData >