pub struct Synapse {Show 13 fields
pub connection_id: String,
pub presynaptic_id: String,
pub postsynaptic_id: String,
pub strength: f64,
pub neurotransmitter_type: NeurotransmitterType,
pub last_activity: u64,
pub total_messages: u64,
pub success_rate: f64,
pub created_at: u64,
pub plasticity: f64,
pub latency_stats: LatencyStats,
pub state: SynapseState,
pub bidirectional: bool,
}Expand description
Synaptic connection between organisms
Fieldsยง
ยงconnection_id: StringUnique connection identifier
presynaptic_id: StringPresynaptic organism (sender)
postsynaptic_id: StringPostsynaptic organism (receiver)
strength: f64Connection strength (0.0-1.0)
neurotransmitter_type: NeurotransmitterTypePrimary neurotransmitter type
last_activity: u64Last activity timestamp
total_messages: u64Total messages transmitted
success_rate: f64Message success rate
created_at: u64Connection creation time
plasticity: f64Synaptic plasticity (ability to change)
latency_stats: LatencyStatsConnection latency statistics
state: SynapseStateConnection state
bidirectional: boolBidirectional capability
Implementationsยง
Sourceยงimpl Synapse
impl Synapse
Sourcepub fn establish(from_id: &str, to_id: &str) -> Result<Self, SynapseError>
pub fn establish(from_id: &str, to_id: &str) -> Result<Self, SynapseError>
Establish a new synaptic connection
Sourcepub async fn transmit(&self, message: NeuralMessage) -> Result<(), SynapseError>
pub async fn transmit(&self, message: NeuralMessage) -> Result<(), SynapseError>
Transmit a neural message through this synapse
Sourcepub fn strengthen(&mut self, factor: f64)
pub fn strengthen(&mut self, factor: f64)
Strengthen the synaptic connection
Sourcepub fn update_latency_stats(&mut self, latency: u64)
pub fn update_latency_stats(&mut self, latency: u64)
Update latency statistics
Sourcepub fn get_performance_metrics(&self) -> SynapsePerformance
pub fn get_performance_metrics(&self) -> SynapsePerformance
Get connection performance metrics
Trait Implementationsยง
Sourceยงimpl<'de> Deserialize<'de> for Synapse
impl<'de> Deserialize<'de> for Synapse
Sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementationsยง
impl Freeze for Synapse
impl RefUnwindSafe for Synapse
impl Send for Synapse
impl Sync for Synapse
impl Unpin for Synapse
impl UnwindSafe for Synapse
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