Struct lib_tcstring::TcModelV1[][src]

pub struct TcModelV1 {
    pub created_at: u64,
    pub updated_at: u64,
    pub cmp_id: u16,
    pub cmp_version: u16,
    pub consent_screen: u8,
    pub consent_lang: String,
    pub vendor_list_version: u16,
    pub purposes_consent: Vec<u8>,
    pub vendors: VendorSet,
}

TcModelV1 contains all relevant fields specified in the Vendor Consent String Format V1 except for the Version field which is omitted

Field mapping

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::TcModelV1::try_from("BOEFEAyOEFEAyAHABDENAI4AAAB9vABAASA");

Fields

created_at: u64

Epoch milliseconds when consent string was first created

updated_at: u64

Epoch milliseconds when consent string was last updated

cmp_id: u16

Consent Manager Provider ID that last updated the consent string

cmp_version: u16

Consent Manager Provider version

consent_screen: u8

Screen number in the CMP where consent was given

consent_lang: String

ISO 639-1 language code in which the CMP UI was presented

vendor_list_version: u16

Version of vendor list used in most recent consent string update

purposes_consent: Vec<u8>

List of permitted purposes

vendors: VendorSet

List of allowed or blocked vendors

See VendorSet for more details

Trait Implementations

impl Clone for TcModelV1[src]

impl Debug for TcModelV1[src]

impl Default for TcModelV1[src]

impl Hash for TcModelV1[src]

impl PartialEq<TcModelV1> for TcModelV1[src]

impl PartialOrd<TcModelV1> for TcModelV1[src]

impl StructuralPartialEq for TcModelV1[src]

impl TryFrom<&'_ str> for TcModelV1[src]

type Error = TcsError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.