Enum primitives::analytics::query::AllowedKey
source · pub enum AllowedKey {
CampaignId,
AdUnit,
AdSlot,
AdSlotType,
Advertiser,
Publisher,
Hostname,
Country,
OsName,
}
Expand description
When adding new AllowedKey
make sure to update the ALLOWED_KEYS
static value.
When (De)Serializing we use camelCase
,
however, when displaying and parsing the value, we use snake_case
.
The later is particular useful when using the value as column in SQL.
Variants
CampaignId
AdUnit
AdSlot
AdSlotType
Advertiser
Publisher
Hostname
Country
OsName
Implementations
sourceimpl AllowedKey
impl AllowedKey
sourcepub fn to_camelCase(&self) -> String
pub fn to_camelCase(&self) -> String
Helper function to get the AllowedKey
as camelCase
.
Trait Implementations
sourceimpl Clone for AllowedKey
impl Clone for AllowedKey
sourcefn clone(&self) -> AllowedKey
fn clone(&self) -> AllowedKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AllowedKey
impl Debug for AllowedKey
sourceimpl<'de> Deserialize<'de> for AllowedKey
impl<'de> Deserialize<'de> for AllowedKey
sourcefn 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
sourceimpl Display for AllowedKey
impl Display for AllowedKey
sourceimpl<'a> FromSql<'a> for AllowedKey
impl<'a> FromSql<'a> for AllowedKey
sourcefn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<Self, Box<dyn Error + Sync + Send>>
fn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<Self, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresourcefn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
. Read moresourceimpl FromStr for AllowedKey
impl FromStr for AllowedKey
sourceimpl Hash for AllowedKey
impl Hash for AllowedKey
sourceimpl PartialEq<AllowedKey> for AllowedKey
impl PartialEq<AllowedKey> for AllowedKey
sourcefn eq(&self, other: &AllowedKey) -> bool
fn eq(&self, other: &AllowedKey) -> bool
sourceimpl Serialize for AllowedKey
impl Serialize for AllowedKey
sourceimpl ToSql for AllowedKey
impl ToSql for AllowedKey
sourcefn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self
into the binary format of the specified
Postgres Type
, appending it to out
. Read moresourcefn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type
. Read moresourcefn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
sourcefn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
impl Copy for AllowedKey
impl Eq for AllowedKey
impl StructuralEq for AllowedKey
impl StructuralPartialEq for AllowedKey
Auto Trait Implementations
impl RefUnwindSafe for AllowedKey
impl Send for AllowedKey
impl Sync for AllowedKey
impl Unpin for AllowedKey
impl UnwindSafe for AllowedKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
sourcefn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to
self
as a ToSql
trait object.