pub struct YAMLWriter;Expand description
Generates .binding.yaml files from ScannedModule instances.
Implementations§
Source§impl YAMLWriter
impl YAMLWriter
Sourcepub fn write(
&self,
modules: &[ScannedModule],
output_dir: &str,
dry_run: bool,
verify: bool,
verifiers: Option<&[&dyn Verifier]>,
) -> Result<Vec<WriteResult>, WriteError>
pub fn write( &self, modules: &[ScannedModule], output_dir: &str, dry_run: bool, verify: bool, verifiers: Option<&[&dyn Verifier]>, ) -> Result<Vec<WriteResult>, WriteError>
Write YAML binding files for each ScannedModule.
output_dir: Directory path to write files to.dry_run: If true, return results without writing to disk.verify: If true, verify written files are valid YAML with required fields.verifiers: Optional custom verifiers run after the built-in check.
§Error handling vs. Python/TypeScript
Unlike the Python and TypeScript implementations which raise/throw on I/O
failures, this method returns Err(WriteError) for any I/O error (e.g.
permission denied, disk full). Callers expecting the Python/TypeScript error
contract should propagate errors with ? or handle them via match.
Auto Trait Implementations§
impl Freeze for YAMLWriter
impl RefUnwindSafe for YAMLWriter
impl Send for YAMLWriter
impl Sync for YAMLWriter
impl Unpin for YAMLWriter
impl UnsafeUnpin for YAMLWriter
impl UnwindSafe for YAMLWriter
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