Enum UserAttribution
#[non_exhaustive]#[repr(u8)]pub enum UserAttribution {
Cn = 1,
Us = 2,
Sg = 3,
Au = 4,
Jp = 5,
Hk = 6,
}Expand description
User attribution returned by the primary-auth salt response.
C++ sources:
FTlogin/ftlogin_ext.h:8-17defines the wire values.FTlogin/config/impl/user_attr_config.cpp:9-20owns the region, authentication-domain, and platform connection-identity mapping.FTlogin/login/ftlogin_manager.cpp:129-144installs that connection identity on the authenticated platform channel.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
§impl UserAttribution
impl UserAttribution
pub fn from_u32(value: u32) -> Option<UserAttribution>
pub fn from_u32(value: u32) -> Option<UserAttribution>
Unknown values remain explicit so callers can apply their documented app-type fallback instead of silently inventing an attribution.
pub fn from_u64(value: u64) -> Option<UserAttribution>
pub fn auth_domain(self) -> &'static str
pub fn region(self) -> &'static str
pub fn to_conn_identity(self) -> u32
pub fn to_conn_identity(self) -> u32
Platform connection identities use the same values as attribution.
See FTConnCmn.proto:12-21 and user_attr_config.cpp:9-20.
Trait Implementations§
§impl Clone for UserAttribution
impl Clone for UserAttribution
§fn clone(&self) -> UserAttribution
fn clone(&self) -> UserAttribution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UserAttribution
§impl Debug for UserAttribution
impl Debug for UserAttribution
§impl<'de> Deserialize<'de> for UserAttribution
impl<'de> Deserialize<'de> for UserAttribution
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UserAttribution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UserAttribution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for UserAttribution
§impl Hash for UserAttribution
impl Hash for UserAttribution
§impl PartialEq for UserAttribution
impl PartialEq for UserAttribution
§impl Serialize for UserAttribution
impl Serialize for UserAttribution
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for UserAttribution
Auto Trait Implementations§
impl Freeze for UserAttribution
impl RefUnwindSafe for UserAttribution
impl Send for UserAttribution
impl Sync for UserAttribution
impl Unpin for UserAttribution
impl UnsafeUnpin for UserAttribution
impl UnwindSafe for UserAttribution
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more