pub struct LayoutBuilder { /* private fields */ }Expand description
Builder for configuring and constructing a BidsLayout.
Provides fine-grained control over dataset indexing, including validation, derivative paths, configuration files, database persistence, ignore/force patterns, and metadata indexing.
§Example
let layout = BidsLayout::builder("/path/to/dataset")
.validate(true)
.index_metadata(true)
.database_path("/tmp/bids_index.sqlite")
.add_derivative("/path/to/derivatives/fmriprep")
.build()
.unwrap();Implementations§
Source§impl LayoutBuilder
impl LayoutBuilder
pub fn new(root: impl AsRef<Path>) -> Self
pub fn validate(self, v: bool) -> Self
pub fn derivatives(self, paths: Vec<PathBuf>) -> Self
pub fn add_derivative(self, path: impl AsRef<Path>) -> Self
pub fn config(self, configs: Vec<String>) -> Self
pub fn regex_search(self, v: bool) -> Self
pub fn database_path(self, path: impl AsRef<Path>) -> Self
pub fn is_derivative(self, v: bool) -> Self
pub fn index_metadata(self, v: bool) -> Self
pub fn ignore(self, patterns: Vec<Regex>) -> Self
pub fn force_index(self, patterns: Vec<Regex>) -> Self
pub fn config_filename(self, name: &str) -> Self
pub fn build(self) -> Result<BidsLayout>
Auto Trait Implementations§
impl Freeze for LayoutBuilder
impl RefUnwindSafe for LayoutBuilder
impl Send for LayoutBuilder
impl Sync for LayoutBuilder
impl Unpin for LayoutBuilder
impl UnsafeUnpin for LayoutBuilder
impl UnwindSafe for LayoutBuilder
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