pub struct ExtractSchemasByPredicate<F>{ /* private fields */ }Expand description
Extracts schemas matching a predicate into a separate file.
This splitter allows fine-grained control over which schemas are extracted by providing a predicate function that determines whether a schema should be moved to the external file.
§Example
ⓘ
use clawspec_core::split::{OpenApiSplitter, ExtractSchemasByPredicate};
// Extract all error-related schemas
let splitter = ExtractSchemasByPredicate::new(
"errors.yaml",
|name| name.contains("Error") || name.contains("Exception"),
);
let result = splitter.split(spec);Implementations§
Source§impl<F> ExtractSchemasByPredicate<F>
impl<F> ExtractSchemasByPredicate<F>
Trait Implementations§
Source§impl<F> Clone for ExtractSchemasByPredicate<F>
impl<F> Clone for ExtractSchemasByPredicate<F>
Source§fn clone(&self) -> ExtractSchemasByPredicate<F>
fn clone(&self) -> ExtractSchemasByPredicate<F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F> OpenApiSplitter for ExtractSchemasByPredicate<F>
impl<F> OpenApiSplitter for ExtractSchemasByPredicate<F>
Auto Trait Implementations§
impl<F> Freeze for ExtractSchemasByPredicate<F>where
F: Freeze,
impl<F> RefUnwindSafe for ExtractSchemasByPredicate<F>where
F: RefUnwindSafe,
impl<F> Send for ExtractSchemasByPredicate<F>where
F: Send,
impl<F> Sync for ExtractSchemasByPredicate<F>where
F: Sync,
impl<F> Unpin for ExtractSchemasByPredicate<F>where
F: Unpin,
impl<F> UnwindSafe for ExtractSchemasByPredicate<F>where
F: UnwindSafe,
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