[][src]Struct ichen_openprotocol::Operator

pub struct Operator<'a> {
    pub operator_id: NonZeroU32,
    pub operator_name: Option<&'a str>,
}

A data structure containing information on a single user on the system.

Fields

operator_id: NonZeroU32

Unique user ID, which cannot be zero.

operator_name: Option<&'a str>

Name of the user.

Methods

impl<'a> Operator<'a>[src]

pub fn new(id: u32) -> Self[src]

Create an Opereator with just an ID and no name.

Panics

Panics if id is zero.

pub fn new_with_name(id: u32, name: &'a str) -> Self[src]

Create an Opereator with name.

Panics

Panics if id is zero.

Trait Implementations

impl<'a> PartialEq<Operator<'a>> for Operator<'a>[src]

impl<'a> Debug for Operator<'a>[src]

impl<'a> Serialize for Operator<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for Operator<'a>[src]

Auto Trait Implementations

impl<'a> Sync for Operator<'a>

impl<'a> Send for Operator<'a>

impl<'a> Unpin for Operator<'a>

impl<'a> RefUnwindSafe for Operator<'a>

impl<'a> UnwindSafe for Operator<'a>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]