[][src]Struct logins::Login

pub struct Login {
    pub guid: Guid,
    pub hostname: String,
    pub form_submit_url: Option<String>,
    pub http_realm: Option<String>,
    pub username: String,
    pub password: String,
    pub username_field: String,
    pub password_field: String,
    pub time_created: i64,
    pub time_password_changed: i64,
    pub time_last_used: i64,
    pub times_used: i64,
}

Fields

guid: Guidhostname: Stringform_submit_url: Option<String>http_realm: Option<String>username: Stringpassword: Stringusername_field: Stringpassword_field: Stringtime_created: i64time_password_changed: i64time_last_used: i64times_used: i64

Implementations

impl Login[src]

pub fn guid(&self) -> &Guid[src]

pub fn guid_str(&self) -> &str[src]

pub fn check_valid(&self) -> Result<()>[src]

Checks whether the Login is valid, without attempting to fix any fields. Returns an error if invalid data is found, even if it could have been fixed.

pub fn fixup(self) -> Result<Self>[src]

Return either the existing login, a fixed-up verion, or an error. This consumes self to make it easy for callers to unconditionally replace a Login with an owned fixed-up version, preventing them from using one that is invalid.

pub fn maybe_fixup(&self) -> Result<Option<Self>>[src]

Like fixup() above, but takes self by reference and returns an Option for the fixed-up version, allowing the caller to make more choices about what to do next.

fn validate_and_fixup_origin(origin: &str) -> Result<Option<String>>[src]

Internal helper for validation and fixups of an "origin" stored as a string.

fn validate_and_fixup(&self, fixup: bool) -> Result<Option<Self>>[src]

Internal helper for doing validation and fixups.

pub(crate) fn from_row(row: &Row<'_>) -> Result<Login>[src]

impl Login[src]

pub(crate) fn apply_delta(&mut self, delta: LoginDelta)[src]

pub(crate) fn delta(&self, older: &Login) -> LoginDelta[src]

Trait Implementations

impl AsMut<Login> for LocalLogin[src]

impl AsMut<Login> for MirrorLogin[src]

impl AsRef<Login> for LocalLogin[src]

impl AsRef<Login> for MirrorLogin[src]

impl Clone for Login[src]

impl Debug for Login[src]

impl Default for Login[src]

impl<'de> Deserialize<'de> for Login[src]

impl From<LocalLogin> for Login[src]

impl From<Login> for PasswordInfo[src]

impl From<Login> for LocalLogin[src]

impl From<Login> for MirrorLogin[src]

impl From<MirrorLogin> for Login[src]

impl From<PasswordInfo> for Login[src]

impl Hash for Login[src]

impl PartialEq<Login> for Login[src]

impl Serialize for Login[src]

impl StructuralPartialEq for Login[src]

Auto Trait Implementations

impl RefUnwindSafe for Login

impl Send for Login

impl Sync for Login

impl Unpin for Login

impl UnwindSafe for Login

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> CallHasher for T where
    T: Hash

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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, 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<V, T> VZip<V> for T where
    V: MultiLane<T>,