pub struct MultiFileLoader;Expand description
Loads and merges JSON schema files from directories
Implementations§
Source§impl MultiFileLoader
impl MultiFileLoader
Sourcepub fn load_from_directory(dir_path: &str) -> Result<Value>
pub fn load_from_directory(dir_path: &str) -> Result<Value>
Load and merge all JSON files from a directory recursively
§Arguments
dir_path- Path to directory containing *.json files
§Returns
Merged Value with “types”, “queries”, “mutations” as arrays
§Errors
- If directory doesn’t exist
- If JSON parsing fails
- If duplicate names are found (with file paths)
§Example
ⓘ
let merged = MultiFileLoader::load_from_directory("schema/")?;Sourcepub fn load_from_directory_with_tracking(dir_path: &str) -> Result<LoadResult>
pub fn load_from_directory_with_tracking(dir_path: &str) -> Result<LoadResult>
Load from directory with file path tracking for conflict detection
Auto Trait Implementations§
impl Freeze for MultiFileLoader
impl RefUnwindSafe for MultiFileLoader
impl Send for MultiFileLoader
impl Sync for MultiFileLoader
impl Unpin for MultiFileLoader
impl UnwindSafe for MultiFileLoader
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