[][src]Struct lib_tcstring::TCModelV1

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

This code runs with edition 2018
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.