Struct gdnative_doc::ConfigFile [−][src]
Structure that holds user configuration settings.
Should be obtained via a toml
configuration file.
Example
const CONFIG_FILE_CONTENT: &str = r#" rename_classes = { RustName = "GDScriptName" } markdown_options = ["STRIKETHROUGH", "TABLES"] "#; let config_file = ConfigFile::read_from(CONFIG_FILE_CONTENT)?; assert!(config_file.url_overrides.is_none()); assert_eq!(config_file.rename_classes.unwrap()["RustName"], "GDScriptName"); assert_eq!( config_file.markdown_options.unwrap(), &["STRIKETHROUGH".to_string(), "TABLES".to_string()] );
Fields
url_overrides: Option<HashMap<String, String>>
List of items for which the linking url should be overriden.
rename_classes: Option<HashMap<String, String>>
Renaming of types when going from Rust to Godot.
This is useful because GDNative allows defining a script_class_name
in the
.gdns
file.
markdown_options: Option<Vec<String>>
Optional markdown options.
Valid options
- FOOTNOTES
- SMART_PUNCTUATION
- STRIKETHROUGH
- TABLES
- TASKLISTS
Default
No option enabled.
Implementations
impl ConfigFile
[src]
pub fn read_from(config: &str) -> Result<Self>
[src]
Read ConfigFile
from the given toml
configuration file.
Trait Implementations
impl Clone for ConfigFile
[src]
fn clone(&self) -> ConfigFile
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ConfigFile
[src]
impl<'de> Deserialize<'de> for ConfigFile
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for ConfigFile
[src]
impl PartialEq<ConfigFile> for ConfigFile
[src]
fn eq(&self, other: &ConfigFile) -> bool
[src]
fn ne(&self, other: &ConfigFile) -> bool
[src]
impl StructuralEq for ConfigFile
[src]
impl StructuralPartialEq for ConfigFile
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConfigFile
[src]
impl Send for ConfigFile
[src]
impl Sync for ConfigFile
[src]
impl Unpin for ConfigFile
[src]
impl UnwindSafe for ConfigFile
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,