Struct lib_tcstring::TcModelV1 [−][src]
TcModelV1
contains all relevant fields specified in the Vendor Consent String Format V1
except for the Version
field which is omitted
Field mapping
Created
->created_at
LastUpdated
->updated_at
CmpId
->cmp_id
CmpVersion
->cmp_version
ConsentScreen
->consent_screen
ConsentLanguage
->consent_lang
VendorListVersion
->vendor_list_version
PurposesAllowed
->purposes_consent
VendorConsents
->vendors
ⓘ
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<TcModelV1> for TcModelV1
[src]
impl PartialOrd<TcModelV1> for TcModelV1
[src]
fn partial_cmp(&self, other: &TcModelV1) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for TcModelV1
[src]
impl TryFrom<&'_ str> for TcModelV1
[src]
Auto Trait Implementations
impl RefUnwindSafe for TcModelV1
impl Send for TcModelV1
impl Sync for TcModelV1
impl Unpin for TcModelV1
impl UnwindSafe for TcModelV1
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,