Added struct field documentation
This commit is contained in:
parent
9e0a4d087b
commit
4e8f910351
@ -58,8 +58,11 @@ use std::fmt;
|
|||||||
/// ```
|
/// ```
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
pub struct Error {
|
pub struct Error {
|
||||||
|
/// The errors name.
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
/// The error description.
|
||||||
pub description: String,
|
pub description: String,
|
||||||
|
/// The errors exit code.
|
||||||
pub exit_code: i32,
|
pub exit_code: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
14
src/lib.rs
14
src/lib.rs
@ -1,4 +1,4 @@
|
|||||||
#![doc = ".github/README.md"]
|
#![doc = include_str!("../.github/README.md")]
|
||||||
// localizer-rs
|
// localizer-rs
|
||||||
// Version: 1.1.0
|
// Version: 1.1.0
|
||||||
|
|
||||||
@ -52,7 +52,8 @@ use serde_json;
|
|||||||
///
|
///
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
///
|
///
|
||||||
/// - `path`: The directory containing the translation files. The directory is relative to the path the executable was executed from.
|
/// - `path`: The directory containing the translation files.
|
||||||
|
/// The directory is relative to the path the executable was executed from.
|
||||||
/// - `language`: The language to translate to.
|
/// - `language`: The language to translate to.
|
||||||
///
|
///
|
||||||
/// # Returns
|
/// # Returns
|
||||||
@ -70,7 +71,10 @@ use serde_json;
|
|||||||
/// ```
|
/// ```
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
|
/// The directory containing the translation files. The directory is relative to the path the
|
||||||
|
/// executable was executed from.
|
||||||
pub path: String,
|
pub path: String,
|
||||||
|
/// The language to translate to.
|
||||||
pub language: String,
|
pub language: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +88,8 @@ impl Config {
|
|||||||
///
|
///
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
///
|
///
|
||||||
/// - `path`: The directory containing the translation files. The directory is relative to the path the executable was executed from.
|
/// - `path`: The directory containing the translation files.
|
||||||
|
/// The directory is relative to the path the executable was executed from.
|
||||||
/// - `language`: The language to translate to.
|
/// - `language`: The language to translate to.
|
||||||
///
|
///
|
||||||
/// # Returns
|
/// # Returns
|
||||||
@ -122,7 +127,8 @@ impl Config {
|
|||||||
/// # Parameters
|
/// # Parameters
|
||||||
///
|
///
|
||||||
/// - `self`: The config object. This must be mutable.
|
/// - `self`: The config object. This must be mutable.
|
||||||
/// - `str_path`: The directory containing the translation files. The directory is relative to the path the executable was executed from.
|
/// - `str_path`: The directory containing the translation files.
|
||||||
|
/// The directory is relative to the path the executable was executed from.
|
||||||
///
|
///
|
||||||
/// # Returns
|
/// # Returns
|
||||||
///
|
///
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user