[][src]Struct gooseberry::configuration::GooseberryConfig

pub struct GooseberryConfig { /* fields omitted */ }

Configuration struct, asks for user input to fill in the optional values the first time gooseberry is run

Implementations

impl GooseberryConfig[src]

pub fn default_config(file: Option<&Path>) -> Result<()>[src]

pub fn print_location() -> Result<()>[src]

Print location of config.toml file

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

Make db and kb directories

pub fn location() -> Result<PathBuf>[src]

Gets the current config file location

pub fn get() -> Result<String>[src]

Get current configuration Hides the developer key (except last three digits)

pub async fn load() -> Result<Self>[src]

Read config from default location

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

Queries and sets all knowledge base related configuration options

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

Sets the knowledge base directory

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

Sets the hierarchy fields which determines the folder hierarchy

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

Sets the annotation template in Handlebars format.

Sets the annotation template in Handlebars format.

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

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

pub async fn set_group(&mut self) -> Result<()>[src]

Sets the Hypothesis group used for Gooseberry annotations This opens a command-line prompt wherein the user can select creating a new group or using an existing group by ID

pub async fn authorize(name: &str, key: &str) -> Result<bool>[src]

Check if user can be authorized

pub async fn request_credentials(&mut self) -> Result<()>[src]

Asks user for Hypothesis credentials and sets them in the config

pub async fn set_credentials(&mut self) -> Result<()>[src]

Reads the HYPOTHESIS_NAME and HYPOTHESIS_KEY environment variables to get Hypothesis credentials. If not present or invalid, requests credentials from user.

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

Write possibly modified config

Trait Implementations

impl Clone for GooseberryConfig[src]

impl Debug for GooseberryConfig[src]

impl Default for GooseberryConfig[src]

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

impl Serialize for GooseberryConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any
[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> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D> OwoColorize for D

impl<T> Pointable for T

type Init = T

The type for initializers.

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