Skip to main content
← Back to kicad-monkey Rust Docs kicad-monkey Rust Crate API Reference

Module schematic_embedded

Module schematic_embedded 

Source
Expand description

Bounded extraction of KiCad’s zstd-compressed schematic sidecars.

Structs§

SchematicEmbeddedError
SchematicEmbeddedFile

Functions§

decode_schematic_embedded_file
Decode one listed schematic embedded file, checking its source checksum. None means the entry authors no (data ...) form; KiCad 9.0.0’s empty (data) form decodes to zero bytes.
schematic_embedded_file
Read one exact, unambiguous schematic resource, checking its source checksum. Other payloads are never decoded, so an unrelated broken font or image does not prevent the selected worksheet from loading. The returned bytes remain in memory.
schematic_embedded_file_entries
List the schematic’s embedded files in source order from their declarations alone, as the PCB view lists its own. Each entry states whether its data is absent, empty or encoded; no payload is decoded, so a data-less or broken file does not hide the others. An entry whose declaration cannot be read is its own error. Decode a listed file with decode_schematic_embedded_file.
schematic_embedded_files
Decode every embedded file of the schematic. Any entry that cannot be decoded, including one with no or empty data, fails the whole call; list with schematic_embedded_file_entries to read each file on its own.