User

Struct User 

Source
pub struct User { /* private fields */ }
Expand description

The user fields describe information about the user that is relevant to the event.

Fields can have one entry or multiple entries. If a user has more than one id, provide an array that includes all of them.

Implementations§

Source§

impl User

Source

pub fn get_id(&self) -> Option<&String>

Unique identifier of the user.

Source

pub fn set_id(&mut self, id_arg: String)

Unique identifier of the user.

§Example

S-1-5-21-202424912787-2692429404-2351956786-1000

Source

pub fn get_name(&self) -> Option<&String>

Short name or login of the user.

Source

pub fn set_name(&mut self, name_arg: String)

Short name or login of the user.

§Example

a.einstein

Source

pub fn get_full_name(&self) -> Option<&String>

User’s full name, if available.

Source

pub fn set_full_name(&mut self, full_name_arg: String)

User’s full name, if available.

§Example

Albert Einstein

Source

pub fn get_email(&self) -> Option<&String>

User email address.

Source

pub fn set_email(&mut self, email_arg: String)

User email address.

Source

pub fn get_hash(&self) -> Option<&String>

Unique user hash to correlate information for a user in anonymized form.

Useful if user.id or user.name contain confidential information and cannot be used.

Source

pub fn set_hash(&mut self, hash_arg: String)

Unique user hash to correlate information for a user in anonymized form.

Useful if user.id or user.name contain confidential information and cannot be used.

Source

pub fn get_domain(&self) -> Option<&String>

Name of the directory the user is a member of.

For example, an LDAP or Active Directory domain name.

Source

pub fn set_domain(&mut self, domain_arg: String)

Name of the directory the user is a member of.

For example, an LDAP or Active Directory domain name.

Source

pub fn get_roles(&self) -> &Vec<String>

Array of user roles at the time of the event.

Source

pub fn add_role(&mut self, role_arg: String)

Array of user roles at the time of the event.

§Example

["kibana_admin", "reporting_user"]

Trait Implementations§

Source§

impl Clone for User

Source§

fn clone(&self) -> User

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for User

Source§

fn default() -> User

Returns the “default value” for a type. Read more
Source§

impl Serialize for User

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.