[][src]Enum kaggle::client::Authentication

pub enum Authentication {
    Env,
    ConfigFile {
        path: Option<PathBuf>,
    },
    Credentials {
        user_name: String,
        key: String,
    },
}

Used to declare the credentials to use for authentication.

Default is the kaggle.json config file.

Variants

Env

Get the credentials from KAGGLE_USERNAME and KAGGLE_KEY env variables.

ConfigFile

Where the kaggle.json file is stored.

Default location is ~/.kaggle/kaggle.json and on windows C:\Users\<Windows-username>\.kaggle\kaggle.json

Fields of ConfigFile

path: Option<PathBuf>
Credentials

Use dedicated credentials for authentication.

Fields of Credentials

user_name: Stringkey: String

Methods

impl Authentication[src]

pub fn with_credentials<S: ToString, T: ToString>(user_name: S, key: T) -> Self[src]

Use dedicated credentials.

pub fn with_config_file(path: impl AsRef<Path>) -> Self[src]

Use credentials from a dedicated location.

Trait Implementations

impl Clone for Authentication[src]

impl Debug for Authentication[src]

impl Default for Authentication[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.