pub struct DumpConfig {
pub dir: Option<PathBuf>,
pub title_field: Option<String>,
pub body_field: Option<String>,
pub sync: Option<SyncMode>,
}Expand description
Configuration for the write-only file-materialization feature.
Placed under the dump: key in schema.yaml. All fields are optional;
the entire dump: section may be absent (defaults to no materialization).
Fields§
§dir: Option<PathBuf>Override directory for dump files.
None→ files are written to<cwd>/.mini-app/<table>/<id>.md.Some(P)→ files are written toP/<id>.md. A relative path is resolved relative to the current working directory at runtime.
title_field: Option<String>Name of the JSON field in record.data to use as the markdown heading.
Defaults to "title" when None.
body_field: Option<String>Name of the JSON field in record.data to use as the markdown body.
Defaults to "body" when None.
sync: Option<SyncMode>Sync mode. None / Some(WriteOnly) → write-only (default).
Some(Bidirectional) is accepted in the schema but bidirectional sync
is not yet implemented; a tracing::warn! is emitted in Store::open.
Trait Implementations§
Source§impl Clone for DumpConfig
impl Clone for DumpConfig
Source§fn clone(&self) -> DumpConfig
fn clone(&self) -> DumpConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DumpConfig
impl Debug for DumpConfig
Source§impl<'de> Deserialize<'de> for DumpConfig
impl<'de> Deserialize<'de> for DumpConfig
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 DumpConfig
impl RefUnwindSafe for DumpConfig
impl Send for DumpConfig
impl Sync for DumpConfig
impl Unpin for DumpConfig
impl UnsafeUnpin for DumpConfig
impl UnwindSafe for DumpConfig
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