Struct rdftk_iri::UserInfo[][src]

pub struct UserInfo { /* fields omitted */ }

The user information sub-component of an IRIs Authority.

Example

use rdftk_iri::authority::{UserInfo};

let user = UserInfo::new("John.Doe").unwrap();

assert!(!user.has_password());

Implementations

impl UserInfo[src]

pub fn new(user_name: &str) -> IriResult<Self>[src]

Construct a new UserInfo instance with only the user’s name specified.

pub fn new_with_password(user_name: &str, password: &str) -> IriResult<Self>[src]

Construct a new UserInfo instance with only the user’s name and password specified.

pub fn user_name(&self) -> &String[src]

Return the user’s name.

pub fn has_password(&self) -> bool[src]

Return true if this instance has a password, else false.

pub fn password(&self) -> &Option<String>[src]

Return the password in this instance, if present.

pub fn set_user_name(&mut self, user_name: &str) -> IriResult<()>[src]

Set the user name value.

pub fn set_password(&mut self, password: &str) -> IriResult<()>[src]

Set the password value.

pub fn unset_password(&mut self)[src]

Set the password value to None.

Trait Implementations

impl Clone for UserInfo[src]

impl Debug for UserInfo[src]

impl Display for UserInfo[src]

impl Eq for UserInfo[src]

impl FromStr for UserInfo[src]

type Err = IriError

The associated error which can be returned from parsing.

impl Hash for UserInfo[src]

impl PartialEq<UserInfo> for UserInfo[src]

impl StructuralEq for UserInfo[src]

impl StructuralPartialEq for UserInfo[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.