pub struct CouplingFabric { /* private fields */ }Expand description
Coupling Fabric manages all coupling relationships
Implementations§
Source§impl CouplingFabric
impl CouplingFabric
pub fn new(config: &CouplingConfig, attention: Arc<AttentionAllocator>) -> Self
Sourcepub async fn register(&self, resonator: &ResonatorId) -> Result<(), String>
pub async fn register(&self, resonator: &ResonatorId) -> Result<(), String>
Register a Resonator in the coupling topology
Sourcepub async fn establish_coupling(
&self,
params: CouplingParams,
) -> Result<(CouplingId, AllocationToken), CouplingError>
pub async fn establish_coupling( &self, params: CouplingParams, ) -> Result<(CouplingId, AllocationToken), CouplingError>
Establish coupling between Resonators
ARCHITECTURAL RULE: Couplings MUST strengthen gradually. Abrupt coupling escalation is a design failure.
Returns the coupling ID and attention token for handle creation by the runtime.
Sourcepub async fn strengthen(
&self,
coupling_id: CouplingId,
delta: f64,
) -> Result<(), CouplingError>
pub async fn strengthen( &self, coupling_id: CouplingId, delta: f64, ) -> Result<(), CouplingError>
Strengthen coupling gradually
Sourcepub async fn weaken(
&self,
coupling_id: CouplingId,
factor: f64,
) -> Result<(), CouplingError>
pub async fn weaken( &self, coupling_id: CouplingId, factor: f64, ) -> Result<(), CouplingError>
Weaken coupling without severing
Sourcepub async fn decouple_safely(
&self,
coupling_id: CouplingId,
) -> Result<DecouplingResult, CouplingError>
pub async fn decouple_safely( &self, coupling_id: CouplingId, ) -> Result<DecouplingResult, CouplingError>
Safe decoupling that preserves commitments
ARCHITECTURAL RULE: Coupling MUST be severed safely without violating existing commitments.
Sourcepub fn get_coupling(&self, id: &CouplingId) -> Option<Coupling>
pub fn get_coupling(&self, id: &CouplingId) -> Option<Coupling>
Get coupling by ID
Sourcepub fn get_couplings_for(&self, resonator: &ResonatorId) -> Vec<Coupling>
pub fn get_couplings_for(&self, resonator: &ResonatorId) -> Vec<Coupling>
Get all couplings for a Resonator
Sourcepub async fn restore_couplings(
&self,
_resonator: &ResonatorId,
couplings: &[Coupling],
) -> Result<(), String>
pub async fn restore_couplings( &self, _resonator: &ResonatorId, couplings: &[Coupling], ) -> Result<(), String>
Restore couplings from continuity record
Sourcepub async fn persist_topology(&self) -> Result<(), String>
pub async fn persist_topology(&self) -> Result<(), String>
Persist coupling topology
Auto Trait Implementations§
impl Freeze for CouplingFabric
impl !RefUnwindSafe for CouplingFabric
impl Send for CouplingFabric
impl Sync for CouplingFabric
impl Unpin for CouplingFabric
impl !UnwindSafe for CouplingFabric
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