pub struct StampContext<'a> {
pub pin_to_mna: &'a dyn Fn(&str) -> Option<usize>,
pub vsrc_base: usize,
pub internal_node_base: usize,
pub sample_rate: f64,
pub reactive_one_ports: Option<&'a mut Vec<MnaOnePort>>,
}Expand description
Context for multi-terminal MNA stamping.
Provides pin-to-MNA-index resolution and pre-allocated vsource indices so components can stamp themselves into the MNA without knowing graph details.
Fields§
§pin_to_mna: &'a dyn Fn(&str) -> Option<usize>Resolve a pin name (e.g., “pos”, “neg”, “out”) to its MNA node index.
Returns None for pins connected to ground or supply rails.
vsrc_base: usizeStarting vsource index allocated for this component.
internal_node_base: usizeStarting internal MNA node index allocated for this component.
Components that declared mna_internal_node_count() > 0 get indices
[internal_node_base .. internal_node_base + mna_internal_node_count()).
sample_rate: f64Sample rate in Hz.
reactive_one_ports: Option<&'a mut Vec<MnaOnePort>>Reactive one-ports for state-space integration.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for StampContext<'a>
impl<'a> !Send for StampContext<'a>
impl<'a> !Sync for StampContext<'a>
impl<'a> !UnwindSafe for StampContext<'a>
impl<'a> Freeze for StampContext<'a>
impl<'a> Unpin for StampContext<'a>
impl<'a> UnsafeUnpin for StampContext<'a>
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