pub trait SubscriptionTable {
// Required methods
fn for_each<F>(&self, f: F)
where F: FnMut(&AgentType, u64, &[u64], &[u64]);
fn add_subscription(
&self,
agent_type: AgentType,
agent_id: Option<u64>,
conn: u64,
is_local: bool,
) -> Result<(), SubscriptionTableError>;
fn remove_subscription(
&self,
agent_type: AgentType,
agent_id: Option<u64>,
conn: u64,
is_local: bool,
) -> Result<(), SubscriptionTableError>;
fn remove_connection(
&self,
conn: u64,
is_local: bool,
) -> Result<(), SubscriptionTableError>;
fn match_one(
&self,
agent_type: AgentType,
agent_id: Option<u64>,
incoming_conn: u64,
) -> Result<u64, SubscriptionTableError>;
fn match_all(
&self,
agent_type: AgentType,
agent_id: Option<u64>,
incoming_conn: u64,
) -> Result<Vec<u64>, SubscriptionTableError>;
}
Required Methods§
fn for_each<F>(&self, f: F)
fn add_subscription( &self, agent_type: AgentType, agent_id: Option<u64>, conn: u64, is_local: bool, ) -> Result<(), SubscriptionTableError>
fn remove_subscription( &self, agent_type: AgentType, agent_id: Option<u64>, conn: u64, is_local: bool, ) -> Result<(), SubscriptionTableError>
fn remove_connection( &self, conn: u64, is_local: bool, ) -> Result<(), SubscriptionTableError>
fn match_one( &self, agent_type: AgentType, agent_id: Option<u64>, incoming_conn: u64, ) -> Result<u64, SubscriptionTableError>
fn match_all( &self, agent_type: AgentType, agent_id: Option<u64>, incoming_conn: u64, ) -> Result<Vec<u64>, SubscriptionTableError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.