pub struct RobinConfig {
pub schema: Option<String>,
pub include: Vec<String>,
pub scripts: HashMap<String, Value>,
}Fields§
§schema: Option<String>Optional pointer to the JSON Schema, preserved across edits so editor
tooling keeps working. Serialized as the conventional $schema key.
include: Vec<String>§scripts: HashMap<String, Value>Implementations§
Source§impl RobinConfig
impl RobinConfig
pub fn load(path: &Path) -> Result<Self>
Sourcepub fn load_raw(path: &Path) -> Result<Self>
pub fn load_raw(path: &Path) -> Result<Self>
Parses a single config file without following include — the scripts are
exactly those declared in this file. Used by commands (like migrate)
that rewrite the file in place and must not inline included scripts.
pub fn save(&self, path: &Path) -> Result<()>
pub fn create_template() -> Self
Trait Implementations§
Source§impl Debug for RobinConfig
impl Debug for RobinConfig
Source§impl Default for RobinConfig
impl Default for RobinConfig
Source§fn default() -> RobinConfig
fn default() -> RobinConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RobinConfig
impl<'de> Deserialize<'de> for RobinConfig
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
Auto Trait Implementations§
impl Freeze for RobinConfig
impl RefUnwindSafe for RobinConfig
impl Send for RobinConfig
impl Sync for RobinConfig
impl Unpin for RobinConfig
impl UnsafeUnpin for RobinConfig
impl UnwindSafe for RobinConfig
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