Skip to main content

BoundaryPolicy

Enum BoundaryPolicy 

Source
pub enum BoundaryPolicy {
    Tight,
    DelayedSense,
    DelayedCoupling(Domain),
}
Expand description

The boundary policy for an edge between two ports, given the directed signal-flow orientation and component memory.

This is the single source of truth for “how must an edge between these two kinds of ports be treated at a stage boundary”. A later formation phase reads BoundaryPolicy::directive to decide whether to co-solve the two ends (tight) or cut + route them with a delay (sense / coupling).

Variants§

§

Tight

Co-solve: the two ports belong to the same solved system (an ordinary forward cascade edge, a conducting edge). No boundary cut.

§

DelayedSense

Cut + sense with a one-sample delay: a FEEDBACK edge into a control electrode (e.g. an output tap rectified back into a sidechain grid). The sense path is broken to keep the forward solve causal.

§

DelayedCoupling(Domain)

Cut + couple across a non-electrical Domain with a one-sample delay: a transducer edge (photocoupler LED drive, OTA Iabc CV). The two networks never share a node; the coupling is delivered next sample.

Implementations§

Source§

impl BoundaryPolicy

Source

pub fn classify( ends: (PortClass, PortClass), flow_is_back_edge: bool, has_memory: bool, ) -> Self

The whole rule table. ends are the two port classes of an edge, flow_is_back_edge is true when the edge runs against the directed signal flow (feedback), and has_memory records whether the coupling element carries state/taus (photocoupler cell, etc.).

Rules (in priority order):

  1. an edge into a PortClass::Transducer → BoundaryPolicy::DelayedCoupling.
  2. a BACK-edge into a PortClass::ControlInput → BoundaryPolicy::DelayedSense.
  3. a FORWARD edge into a PortClass::ControlInput (cascade) → BoundaryPolicy::Tight.
  4. everything else → BoundaryPolicy::Tight.

has_memory is part of the signature because a future refinement may route a memoryless transducer differently from a stateful one; in the Phase-1 table it does not change the outcome (a transducer coupling is always delayed, with or without its own state).

Source

pub fn directive(&self) -> Directive

The declarative consequence a formation consumer applies (Phase 1: all consumers are absent, so this output is never acted on).

Trait Implementations§

Source§

impl Clone for BoundaryPolicy

Source§

fn clone(&self) -> BoundaryPolicy

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BoundaryPolicy

Source§

impl Debug for BoundaryPolicy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for BoundaryPolicy

Source§

impl PartialEq for BoundaryPolicy

Source§

fn eq(&self, other: &BoundaryPolicy) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for BoundaryPolicy

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more