Struct E2eiClientId
pub struct E2eiClientId {
pub user_id: Uuid,
pub device_id: u64,
pub domain: String,
}Expand description
Unique user handle
Fields§
§user_id: Uuidbase64url encoded UUIDv4 unique user identifier
device_id: u64the device id assigned by the backend in hex
domain: Stringthe backend domain of the client
Implementations§
§impl ClientId
impl ClientId
pub const DEFAULT_USER: Uuid
pub const DEFAULT_USER: Uuid
Default user
pub const URI_RAW_SCHEME: &'static str = "wireapp"
pub const URI_RAW_SCHEME: &'static str = "wireapp"
URI scheme for all subject URIs
pub const URI_SCHEME: &'static str
pub const URI_SCHEME: &'static str
URI scheme for all subject URIs
pub const URI_DELIMITER: &'static str = "!"
pub const URI_DELIMITER: &'static str = "!"
user-id & device-id separator when ClientId is represented as a URI
pub fn try_new(
user_id: impl AsRef<str>,
device_id: u64,
domain: &str,
) -> Result<ClientId, RustyJwtError>
pub fn try_new( user_id: impl AsRef<str>, device_id: u64, domain: &str, ) -> Result<ClientId, RustyJwtError>
Constructor
pub fn try_from_raw_parts(
user_id: &[u8],
device_id: u64,
domain: &[u8],
) -> Result<ClientId, RustyJwtError>
pub fn try_from_raw_parts( user_id: &[u8], device_id: u64, domain: &[u8], ) -> Result<ClientId, RustyJwtError>
Constructor
pub fn try_from_uri(client_id: &str) -> Result<ClientId, RustyJwtError>
pub fn try_from_uri(client_id: &str) -> Result<ClientId, RustyJwtError>
Parse from an URI e.g. wireapp://{userId}%21{clientId}@{domain} where ‘%21’ is ‘!’ percent encoded
pub fn try_from_qualified(client_id: &str) -> Result<ClientId, RustyJwtError>
pub fn try_from_qualified(client_id: &str) -> Result<ClientId, RustyJwtError>
Constructor for clientId usually used by Wire client application. It is not a URI (does not have a scheme)
e.g. wireapp://{userId}!{clientId}@{domain}
pub fn to_qualified(&self) -> String
pub fn to_qualified(&self) -> String
Without URI scheme
Trait Implementations§
§impl<'de> Deserialize<'de> for ClientId
Available on crate features test-utils only.
impl<'de> Deserialize<'de> for ClientId
Available on crate features
test-utils only.§fn deserialize<D>(
_deserializer: D,
) -> Result<ClientId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
_deserializer: D,
) -> Result<ClientId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for ClientId
Available on crate features test-utils only.
impl Serialize for ClientId
Available on crate features
test-utils only.§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 Eq for ClientId
impl StructuralPartialEq for ClientId
Auto Trait Implementations§
impl Freeze for ClientId
impl RefUnwindSafe for ClientId
impl Send for ClientId
impl Sync for ClientId
impl Unpin for ClientId
impl UnwindSafe for ClientId
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,
§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
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.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