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]
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 StructuralEq for UserInfo
[src]
impl StructuralEq for UserInfo
[src]impl StructuralPartialEq for UserInfo
[src]
impl StructuralPartialEq for UserInfo
[src]Auto Trait Implementations
impl RefUnwindSafe for UserInfo
impl RefUnwindSafe for UserInfo
impl UnwindSafe for UserInfo
impl UnwindSafe for UserInfo