[−][src]Struct lib_tcstring::TCModelV2
TCModelV1
contains all relevant fields specified in the Vendor Consent String Format V2
except for the Version
field which is omitted
Note that the "Core String", "Disclosed Vendors", "Allowed Vendors" and "Publisher TC" segments are mapped into fields
"Core String" field mapping
Created
->created_at
LastUpdated
->updated_at
CmpId
->cmp_id
CmpVersion
->cmp_version
ConsentScreen
->consent_screen
ConsentLanguage
->consent_language
VendorListVersion
->vendor_list_version
TcfPolicyVersion
->tcf_policy_version
IsServiceSpecific
->is_service_specific
UseNonStandardStacks
->use_non_standard_stacks
SpecialFeatureOptIns
->special_feature_opt_ins
PurposesConsent
->purpose_consents
PurposesLITransparancy
->purpose_li_transparency
PurposeOneTreatment
->purpose_one_treatment
PublisherCC
->publisher_country_code
VendorsConsent
->vendor_consents
VendorsLIConsent
->vendor_li_consents
PublisherRestrictions
->publisher_restrictions
"Disclosed Vendors" segment is mapped by the disclosed_vendors
field
"Allowed Vendors" segment is mapped by the allowed_vendors
field
"Publisher TC" field mapping
PubPurposesConsent
->publisher_purposes_consent
PubPurposesLITransparency
->publisher_purposes_li_transparency
CustomPurposesConsent
->custom_purposes_consent
CustomPurposesLITransparency
->custom_purposes_li_transparency
use std::convert::TryFrom; // will return a Result which contains either the TCModel or an Error // if the TCString could not be parsed or the TCString includes an unsupported version let tc_model = lib_tcstring::TCModelV2::try_from("COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA");
Fields
created_at: u64
Epoch milliseconds when this TC String was first created
updated_at: u64
Epoch milliseconds when TC String was last updated
cmp_id: u16
Consent Management Platform ID that last updated the TC String
cmp_version: u16
Consent Management Platform version of the CMP that last updated this TC String
consent_screen: u8
CMP Screen number at which consent was given for a user with the CMP that last updated this TC String
consent_language: String
ISO 639-1
language code in which the CMP UI was presented
vendor_list_version: u16
Version of the global vendor list used to create this TC String
tcf_policy_version: u16
Version of the corresponding field in the global vendor list that was used for obtaining consent
is_service_specific: bool
Whether the signals encoded in this TC String were from service-specific storage (true
) or shared storage (false
)
use_non_standard_stacks: bool
true
means that a CMP is using customized Stack descriptions and not the standard stack descriptions
defined in the Policies
(Appendix A, Section E)
false
means standard stacks were used
special_feature_opt_ins: Vec<u8>
List of opted-in "Special Features"
"Special Features" are numerically identified in the global vendor list separately from normal features
purpose_consents: Vec<u8>
List of allowed purposes
purpose_li_transparency: Vec<u8>
List of allowed "Legitimate Interest" purposes
purpose_one_treatment: bool
true
means "Purpose 1" was not disclosed
false
means "Purpose 1" was disclosed commonly as consent
publisher_country_code: String
ISO 3166-1 alpha-2
code
vendor_consents: Vec<u16>
List of allowed vendors
vendor_li_consents: Vec<u16>
List of vendors "Legitimate Interest" disclosures
publisher_restrictions: Vec<PublisherRestriction>
List of publisher restrictions on a per purpose basis
See PublisherRestriction
for more details
disclosed_vendors: Vec<u16>
List of vendors that have been disclosed to a given user by a CMP
allowed_vendors: Vec<u16>
List of vendors the publisher permits to use OOB legal bases
publisher_purposes_consent: Vec<u8>
List of purposes which are established on the legal basis of consent, for the publisher
publisher_purposes_li_transparency: Vec<u8>
List of purposes which are established on the legal basis of "Legitimate Interest" and the user has not exercised their “Right to Object”
custom_purposes_consent: Vec<u8>
List of allowed custom purposes, for the publisher
custom_purposes_li_transparency: Vec<u8>
List of custom purposes which are are established on the legal basis of "Legitimate Interest"
Trait Implementations
impl Clone for TCModelV2
[src]
impl Debug for TCModelV2
[src]
impl Default for TCModelV2
[src]
impl Hash for TCModelV2
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<TCModelV2> for TCModelV2
[src]
impl PartialOrd<TCModelV2> for TCModelV2
[src]
fn partial_cmp(&self, other: &TCModelV2) -> Option<Ordering>
[src]
fn lt(&self, other: &TCModelV2) -> bool
[src]
fn le(&self, other: &TCModelV2) -> bool
[src]
fn gt(&self, other: &TCModelV2) -> bool
[src]
fn ge(&self, other: &TCModelV2) -> bool
[src]
impl StructuralPartialEq for TCModelV2
[src]
impl<'_> TryFrom<&'_ str> for TCModelV2
[src]
Auto Trait Implementations
impl RefUnwindSafe for TCModelV2
impl Send for TCModelV2
impl Sync for TCModelV2
impl Unpin for TCModelV2
impl UnwindSafe for TCModelV2
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,