Struct credent_model::Profile[][src]

pub struct Profile<C = Credentials> {
    pub name: String,
    pub credentials: C,
}

Profile to store credentials under.

This allows the credentials file to hold credentials for multiple environments.

Fields

name: String

Profile name.

credentials: C

Credentials for this profile.

Implementations

impl<C> Profile<C>[src]

pub const DEFAULT_NAME: &'static str[src]

Name given to the default profile.

pub fn new(name: String, credentials: C) -> Self[src]

Returns a new Profile.

pub fn new_default(credentials: C) -> Self[src]

Returns a new Profile with the "default" name.

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

Returns whether this profile has the "default" profile name.

Trait Implementations

impl<C> Borrow<str> for Profile<C>[src]

impl<C: Clone> Clone for Profile<C>[src]

impl<C: Debug> Debug for Profile<C>[src]

impl<'de, C> Deserialize<'de> for Profile<C> where
    C: Deserialize<'de>, 
[src]

impl<C> Display for Profile<C> where
    C: Display
[src]

impl<C: Eq> Eq for Profile<C>[src]

impl<C> Ord for Profile<C> where
    C: Eq
[src]

impl<C: PartialEq> PartialEq<Profile<C>> for Profile<C>[src]

impl<C> PartialOrd<Profile<C>> for Profile<C> where
    C: Eq
[src]

impl<C> Serialize for Profile<C> where
    C: Serialize
[src]

impl<C> StructuralEq for Profile<C>[src]

impl<C> StructuralPartialEq for Profile<C>[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for Profile<C> where
    C: RefUnwindSafe

impl<C> Send for Profile<C> where
    C: Send

impl<C> Sync for Profile<C> where
    C: Sync

impl<C> Unpin for Profile<C> where
    C: Unpin

impl<C> UnwindSafe for Profile<C> where
    C: UnwindSafe

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> 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> 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.