pub enum ConsentState<T> {
Yes(T),
No,
}Expand description
The state of the consent.
There are two basic states: ConsentState::No, which means that the user rejects everything.
And ConsentState::Yes, which means that the user agrees, but there may be additional
customizations, based on the type of T being used.
Variants§
Yes(T)
The user consents. May have additional payload, use () if none.
No
The user does not consent.
Trait Implementations§
Source§impl<T: Clone> Clone for ConsentState<T>
impl<T: Clone> Clone for ConsentState<T>
Source§fn clone(&self) -> ConsentState<T>
fn clone(&self) -> ConsentState<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for ConsentState<T>
impl<T: Debug> Debug for ConsentState<T>
Source§impl<T> Default for ConsentState<T>
impl<T> Default for ConsentState<T>
Source§fn default() -> ConsentState<T>
fn default() -> ConsentState<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for ConsentState<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ConsentState<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: PartialEq> PartialEq for ConsentState<T>
impl<T: PartialEq> PartialEq for ConsentState<T>
Source§impl<T> Serialize for ConsentState<T>where
T: Serialize,
impl<T> Serialize for ConsentState<T>where
T: Serialize,
impl<T: Eq> Eq for ConsentState<T>
impl<T> StructuralPartialEq for ConsentState<T>
Auto Trait Implementations§
impl<T> Freeze for ConsentState<T>where
T: Freeze,
impl<T> RefUnwindSafe for ConsentState<T>where
T: RefUnwindSafe,
impl<T> Send for ConsentState<T>where
T: Send,
impl<T> Sync for ConsentState<T>where
T: Sync,
impl<T> Unpin for ConsentState<T>where
T: Unpin,
impl<T> UnwindSafe for ConsentState<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.