pub struct UserProfile {
pub id: UserId,
pub login_name: String,
pub display_name: Option<String>,
}Expand description
Display-friendly identity for the user that owns a Node, resolved from the netmap’s
UserProfiles table (Go tailcfg.UserProfile). Owned counterpart of the borrow-bound
ts_control_serde::UserProfile. Keyed by UserProfile::id (== Node::user_id).
Fields§
§id: UserIdThe integer id of the Tailscale user this profile describes (matches Node::user_id).
login_name: StringAn email-ish login name for display (e.g. alice@example.com / alice@github). May be
empty if control sent none.
display_name: Option<String>The user’s display name (e.g. Alice Smith), if the IdP provided one.
Implementations§
Source§impl UserProfile
impl UserProfile
Sourcepub fn best_label(&self) -> Option<String>
pub fn best_label(&self) -> Option<String>
The best human-facing label for this user: the login name when present, else the display
name, else None. This is what a WhoIs surfaces as the owning user.
Trait Implementations§
Source§impl Clone for UserProfile
impl Clone for UserProfile
Source§fn clone(&self) -> UserProfile
fn clone(&self) -> UserProfile
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 moreSource§impl Debug for UserProfile
impl Debug for UserProfile
impl Eq for UserProfile
Source§impl From<&UserProfile<'_>> for UserProfile
impl From<&UserProfile<'_>> for UserProfile
Source§fn from(value: &UserProfile<'_>) -> Self
fn from(value: &UserProfile<'_>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UserProfile
impl PartialEq for UserProfile
Source§fn eq(&self, other: &UserProfile) -> bool
fn eq(&self, other: &UserProfile) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UserProfile
Auto Trait Implementations§
impl Freeze for UserProfile
impl RefUnwindSafe for UserProfile
impl Send for UserProfile
impl Sync for UserProfile
impl Unpin for UserProfile
impl UnsafeUnpin for UserProfile
impl UnwindSafe for UserProfile
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.