pub trait SubsystemSender<OutgoingMessage>: Clone + Send + 'static
where OutgoingMessage: Send,
{ // Required methods fn send_message<'life0, 'async_trait>( &'life0 mut self, msg: OutgoingMessage ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn send_message_with_priority<'life0, 'async_trait, P>( &'life0 mut self, msg: OutgoingMessage ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where 'life0: 'async_trait, P: 'async_trait + Priority, Self: 'async_trait; fn try_send_message( &mut self, msg: OutgoingMessage ) -> Result<(), TrySendError<OutgoingMessage>>; fn try_send_message_with_priority<P>( &mut self, msg: OutgoingMessage ) -> Result<(), TrySendError<OutgoingMessage>> where P: Priority; fn send_messages<'life0, 'async_trait, I>( &'life0 mut self, msgs: I ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where 'life0: 'async_trait, I: IntoIterator<Item = OutgoingMessage> + Send + 'async_trait, <I as IntoIterator>::IntoIter: Send, Self: 'async_trait; fn send_unbounded_message(&mut self, msg: OutgoingMessage); }
Expand description

Sender end of a channel to interface with a subsystem.

Required Methods§

fn send_message<'life0, 'async_trait>( &'life0 mut self, msg: OutgoingMessage ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Send a direct message to some other Subsystem, routed based on message type.

fn send_message_with_priority<'life0, 'async_trait, P>( &'life0 mut self, msg: OutgoingMessage ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, P: 'async_trait + Priority, Self: 'async_trait,

Send a direct message with defined priority to some other Subsystem, routed based on message type.

fn try_send_message( &mut self, msg: OutgoingMessage ) -> Result<(), TrySendError<OutgoingMessage>>

Tries to send a direct message to some other Subsystem, routed based on message type. This method is useful for cases where the message queue is bounded and the message is ok to be dropped if the queue is full. If the queue is full, this method will return an error. This method is not async and will not block the current task.

fn try_send_message_with_priority<P>( &mut self, msg: OutgoingMessage ) -> Result<(), TrySendError<OutgoingMessage>>
where P: Priority,

Tries to send a direct message with defined priority to some other Subsystem, routed based on message type. If the queue is full, this method will return an error. This method is not async and will not block the current task.

fn send_messages<'life0, 'async_trait, I>( &'life0 mut self, msgs: I ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, I: IntoIterator<Item = OutgoingMessage> + Send + 'async_trait, <I as IntoIterator>::IntoIter: Send, Self: 'async_trait,

Send multiple direct messages to other Subsystems, routed based on message type.

fn send_unbounded_message(&mut self, msg: OutgoingMessage)

Send a message onto the unbounded queue of some other Subsystem, routed based on message type.

This function should be used only when there is some other bounding factor on the messages sent with it. Otherwise, it risks a memory leak.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<ApprovalDistributionOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, ApprovalDistributionOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<ApprovalDistributionOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<ApprovalVotingOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, ApprovalVotingOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<ApprovalVotingOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<AvailabilityDistributionOutgoingMessages>

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<AvailabilityRecoveryOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, AvailabilityRecoveryOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<AvailabilityRecoveryOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<AvailabilityStoreOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, AvailabilityStoreOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<AvailabilityStoreOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<BitfieldDistributionOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, BitfieldDistributionOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<BitfieldDistributionOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<BitfieldSigningOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, BitfieldSigningOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<BitfieldSigningOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<CandidateBackingOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, CandidateBackingOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<CandidateBackingOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<CandidateValidationOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, CandidateValidationOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<CandidateValidationOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<ChainApiOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, ChainApiOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<ChainApiOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<ChainSelectionOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, ChainSelectionOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<ChainSelectionOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<CollationGenerationOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, CollationGenerationOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<CollationGenerationOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<CollatorProtocolOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, CollatorProtocolOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<CollatorProtocolOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<DisputeCoordinatorOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, DisputeCoordinatorOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<DisputeCoordinatorOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<DisputeDistributionOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, DisputeDistributionOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<DisputeDistributionOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<GossipSupportOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, GossipSupportOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<GossipSupportOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<NetworkBridgeRxOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, NetworkBridgeRxOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<NetworkBridgeRxOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<NetworkBridgeTxOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, NetworkBridgeTxOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<NetworkBridgeTxOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<ProspectiveParachainsOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, ProspectiveParachainsOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<ProspectiveParachainsOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<ProvisionerOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, ProvisionerOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<ProvisionerOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<PvfCheckerOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, PvfCheckerOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<PvfCheckerOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<RuntimeApiOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, RuntimeApiOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<RuntimeApiOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<StatementDistributionOutgoingMessages>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, StatementDistributionOutgoingMessages: From<OutgoingMessage> + Send, AllMessages: From<StatementDistributionOutgoingMessages> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,

source§

impl<OutgoingMessage> SubsystemSender<OutgoingMessage> for OverseerSender<()>
where OutgoingMessage: TryFrom<AllMessages> + Send + 'static, (): From<OutgoingMessage> + Send, AllMessages: From<()> + Send, <OutgoingMessage as TryFrom<AllMessages>>::Error: Debug,