Module config

Source
Expand description

The config module contains the Config struct, which is used to initialize configuration for the API. Currently contains the API token, the user agent and the base url.

§Example

use replicate_rust::{Replicate, config::Config};

let config = Config {
    auth : String::from("REPLICATE_API_TOKEN"),
    ..Default::default()
};

let replicate = Replicate::new(config); // config OR Default::default()

§Note

The Config struct implements the Default trait, so you can also use Default::default() to initialize the config.

use replicate_rust::{Replicate, config::Config};

let config = Config::default();

let replicate = Replicate::new(config);

Structs§

Config
The Config struct is used to initialize configuration for the API. Currently contains the API token, the user agent and the base url.