pub struct ConfigFile {
pub generator: GeneratorSection,
pub features: FeaturesSection,
pub http_client: Option<HttpClientSection>,
pub streaming: Option<StreamingSection>,
pub nullable_overrides: BTreeMap<String, bool>,
pub type_mappings: BTreeMap<String, String>,
}Expand description
Root configuration loaded from TOML file
Fields§
§generator: GeneratorSection§features: FeaturesSection§http_client: Option<HttpClientSection>§streaming: Option<StreamingSection>§nullable_overrides: BTreeMap<String, bool>§type_mappings: BTreeMap<String, String>Implementations§
Source§impl ConfigFile
impl ConfigFile
Sourcepub fn load(path: &Path) -> Result<Self, GeneratorError>
pub fn load(path: &Path) -> Result<Self, GeneratorError>
Load and validate configuration from TOML file
Sourcepub fn into_generator_config(self) -> GeneratorConfig
pub fn into_generator_config(self) -> GeneratorConfig
Convert to internal GeneratorConfig
Trait Implementations§
Source§impl Clone for ConfigFile
impl Clone for ConfigFile
Source§fn clone(&self) -> ConfigFile
fn clone(&self) -> ConfigFile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigFile
impl Debug for ConfigFile
Source§impl<'de> Deserialize<'de> for ConfigFile
impl<'de> Deserialize<'de> for ConfigFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ConfigFile
impl Serialize for ConfigFile
Source§impl Validate for ConfigFile
impl Validate for ConfigFile
Source§impl<'v_a> ValidateArgs<'v_a> for ConfigFile
impl<'v_a> ValidateArgs<'v_a> for ConfigFile
Auto Trait Implementations§
impl Freeze for ConfigFile
impl RefUnwindSafe for ConfigFile
impl Send for ConfigFile
impl Sync for ConfigFile
impl Unpin for ConfigFile
impl UnwindSafe for ConfigFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more