#[non_exhaustive]pub struct User {Show 19 fields
pub user_id: Option<String>,
pub first_name: Option<String>,
pub last_name: Option<String>,
pub username: Option<String>,
pub security_groups: Option<Vec<String>>,
pub is_admin: Option<bool>,
pub suspended: Option<bool>,
pub status: Option<i32>,
pub otp_enabled: Option<bool>,
pub scim_id: Option<String>,
pub type: Option<String>,
pub cell: Option<String>,
pub country_code: Option<String>,
pub challenge_failures: Option<i32>,
pub is_invite_expired: Option<bool>,
pub is_user: Option<bool>,
pub invite_code: Option<String>,
pub code_validation: Option<bool>,
pub uname: Option<String>,
}Expand description
Represents a user account in a Wickr network with detailed profile information, status, security settings, and authentication details.
codeValidation, inviteCode and inviteCodeTtl are restricted to networks under preview only.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.user_id: Option<String>The unique identifier for the user within the network.
first_name: Option<String>The first name of the user.
last_name: Option<String>The last name of the user.
username: Option<String>The email address or username of the user. For bots, this must end in 'bot'.
security_groups: Option<Vec<String>>A list of security group IDs to which the user is assigned, determining their permissions and feature access.
is_admin: Option<bool>Indicates whether the user has administrator privileges in the network.
suspended: Option<bool>Indicates whether the user is currently suspended and unable to access the network.
status: Option<i32>The current status of the user (1 for pending invitation, 2 for active).
otp_enabled: Option<bool>Indicates whether one-time password (OTP) authentication is enabled for the user.
scim_id: Option<String>The SCIM (System for Cross-domain Identity Management) identifier for the user, used for identity synchronization. Currently not used.
type: Option<String>The descriptive type of the user account (e.g., 'user').
cell: Option<String>The phone number minus country code, used for cloud deployments.
country_code: Option<String>The country code for the user's phone number, used for cloud deployments.
challenge_failures: Option<i32>The number of failed password attempts for enterprise deployments, used for account lockout policies.
is_invite_expired: Option<bool>Indicates whether the user's email invitation code has expired, applicable to cloud deployments.
is_user: Option<bool>Indicates whether this account is a user (as opposed to a bot or other account type).
invite_code: Option<String>The invitation code for this user, used during registration to join the network.
code_validation: Option<bool>Indicates whether the user can be verified through a custom invite code.
uname: Option<String>The unique identifier for the user.
Implementations§
Source§impl User
impl User
Sourcepub fn first_name(&self) -> Option<&str>
pub fn first_name(&self) -> Option<&str>
The first name of the user.
Sourcepub fn username(&self) -> Option<&str>
pub fn username(&self) -> Option<&str>
The email address or username of the user. For bots, this must end in 'bot'.
Sourcepub fn security_groups(&self) -> &[String]
pub fn security_groups(&self) -> &[String]
A list of security group IDs to which the user is assigned, determining their permissions and feature access.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .security_groups.is_none().
Sourcepub fn is_admin(&self) -> Option<bool>
pub fn is_admin(&self) -> Option<bool>
Indicates whether the user has administrator privileges in the network.
Sourcepub fn suspended(&self) -> Option<bool>
pub fn suspended(&self) -> Option<bool>
Indicates whether the user is currently suspended and unable to access the network.
Sourcepub fn status(&self) -> Option<i32>
pub fn status(&self) -> Option<i32>
The current status of the user (1 for pending invitation, 2 for active).
Sourcepub fn otp_enabled(&self) -> Option<bool>
pub fn otp_enabled(&self) -> Option<bool>
Indicates whether one-time password (OTP) authentication is enabled for the user.
Sourcepub fn scim_id(&self) -> Option<&str>
pub fn scim_id(&self) -> Option<&str>
The SCIM (System for Cross-domain Identity Management) identifier for the user, used for identity synchronization. Currently not used.
Sourcepub fn cell(&self) -> Option<&str>
pub fn cell(&self) -> Option<&str>
The phone number minus country code, used for cloud deployments.
Sourcepub fn country_code(&self) -> Option<&str>
pub fn country_code(&self) -> Option<&str>
The country code for the user's phone number, used for cloud deployments.
Sourcepub fn challenge_failures(&self) -> Option<i32>
pub fn challenge_failures(&self) -> Option<i32>
The number of failed password attempts for enterprise deployments, used for account lockout policies.
Sourcepub fn is_invite_expired(&self) -> Option<bool>
pub fn is_invite_expired(&self) -> Option<bool>
Indicates whether the user's email invitation code has expired, applicable to cloud deployments.
Sourcepub fn is_user(&self) -> Option<bool>
pub fn is_user(&self) -> Option<bool>
Indicates whether this account is a user (as opposed to a bot or other account type).
Sourcepub fn invite_code(&self) -> Option<&str>
pub fn invite_code(&self) -> Option<&str>
The invitation code for this user, used during registration to join the network.
Sourcepub fn code_validation(&self) -> Option<bool>
pub fn code_validation(&self) -> Option<bool>
Indicates whether the user can be verified through a custom invite code.
Trait Implementations§
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)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> 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>
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>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);