Crate pcb_rs_traits
source · [−]Structs
Used to represent a specific pin of a specific chip in pcb! generated struct. Both fields are ’static , because when generating we know the names, and thus can be stored as static strings
This will store the metadata of the pin, for the encompassing module (usually generated using pcb!) to use. Reason that the data_type is &’static str is that when deriving the Chip using Chip derive macro, or even when hand-implementing ChipInterface, the data type of the pin will be known in advance. Name is not stored here as it will be the key of hashmap
Enums
This enum represents three types of pin connections possible
Traits
This is intended to be implemented manually by user of the library. This provides the functionality of actually “running” the logic of the chip
This is the interface which should be exposed by the chip struct, and will be used by the pcb module. This is meant to be implemented by the #[Derive(Chip)] macro, but can also be manually implemented if needed
This trait is used to create trait objects to store in the pcb created by the pbc! macro This currently uses downcast-rs so we can store the chips as dyn HardwareModule, but are able to downcast to concrete type if needed by user.