[][src]Enum kpdb::StringKey

pub enum StringKey {
    Notes,
    Other(String),
    Password,
    Title,
    Url,
    Username,
}

A key for the map with strings.

Variants

Notes

The value is a notes string.

Other(String)

The value is an other string with specified name.

Password

The value is a password string.

Title

The value is a title string.

Url

The value is a URL string.

Username

The value is a username string.

Methods

impl StringKey[src]

pub fn from_string(string: &str) -> StringKey[src]

Create a string key from a string.

Examples

use kpdb::StringKey;

let notes_key = StringKey::from_string("Notes");
let password_key = StringKey::from_string("Password");
let title_key = StringKey::from_string("Title");
let url_key = StringKey::from_string("URL");
let username_key = StringKey::from_string("UserName");
let other_key = StringKey::from_string("Foo");

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

Gets the string representation of the string key.

Examples

use kpdb::StringKey;

let notes_key = StringKey::Notes;
let string = notes_key.to_string();

Trait Implementations

impl Clone for StringKey[src]

impl Debug for StringKey[src]

impl Eq for StringKey[src]

impl Hash for StringKey[src]

impl Ord for StringKey[src]

impl PartialEq<StringKey> for StringKey[src]

impl PartialOrd<StringKey> for StringKey[src]

impl StructuralEq for StringKey[src]

impl StructuralPartialEq for StringKey[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, 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.