pub struct SourceRule {
pub glob: String,
pub exclude: Vec<String>,
pub ty: Option<String>,
pub owner: String,
pub key: String,
pub name: Option<String>,
pub default_status: Option<String>,
pub status: BTreeMap<String, String>,
pub redirect: Option<String>,
pub alias_fields: Vec<String>,
pub sibling_dir: bool,
}Fields§
§glob: StringFiles to import; a pattern ending in / matches directories, imported as bundles.
exclude: Vec<String>§ty: Option<String>The document type. Required unless redirect is set.
owner: Stringauto (from governs, then from the code paths the text mentions) or a fixed owner id.
key: StringHow the key is chosen for timestamp types: name (from name’s key group),
first-commit (the file’s first commit time) or created (frontmatter created date).
name: Option<String>A regex over the file or directory name with optional named groups key, slug, alias.
default_status: Option<String>Status for documents without one.
status: BTreeMap<String, String>Status overrides for this source only.
redirect: Option<String>The file is a “moved” stub: a regex with a target group naming the new path. Stubs become
alias rows and are removed.
alias_fields: Vec<String>Extra frontmatter fields whose values become aliases (old ids).
sibling_dir: boolFor files: also take the sibling directory <stem>/ as the bundle.
Trait Implementations§
Source§impl Clone for SourceRule
impl Clone for SourceRule
Source§impl Debug for SourceRule
impl Debug for SourceRule
Source§impl<'de> Deserialize<'de> for SourceRule
impl<'de> Deserialize<'de> for SourceRule
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>,
Auto Trait Implementations§
impl Freeze for SourceRule
impl RefUnwindSafe for SourceRule
impl Send for SourceRule
impl Sync for SourceRule
impl Unpin for SourceRule
impl UnsafeUnpin for SourceRule
impl UnwindSafe for SourceRule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more