clementine_core::utils

Trait NamedEntity

Source
pub trait NamedEntity:
    Sync
    + Send
    + 'static {
    const ENTITY_NAME: &'static str;
    const TX_SENDER_CONSUMER_ID: &'static str;
    const FINALIZED_BLOCK_CONSUMER_ID_NO_AUTOMATION: &'static str;
    const FINALIZED_BLOCK_CONSUMER_ID_AUTOMATION: &'static str;
}
Expand description

A trait for entities that have a name, operator, verifier, etc. Used to distinguish between state machines with different owners in the database, and to provide a human-readable name for the entity for task names.

Required Associated Constants§

Source

const ENTITY_NAME: &'static str

A string identifier for this owner type used to distinguish between state machines with different owners in the database.

§Example

“operator”, “verifier”, “user”

Source

const TX_SENDER_CONSUMER_ID: &'static str

Consumer ID for the tx sender task.

Source

const FINALIZED_BLOCK_CONSUMER_ID_NO_AUTOMATION: &'static str

Consumer ID for the finalized block task with no automation.

Source

const FINALIZED_BLOCK_CONSUMER_ID_AUTOMATION: &'static str

Consumer ID for the finalized block task with automation.

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.

Implementors§

Source§

impl<C> NamedEntity for Operator<C>
where C: CitreaClientT,

Source§

const ENTITY_NAME: &'static str = "operator"

Source§

const TX_SENDER_CONSUMER_ID: &'static str = "verifier_tx_sender"

Source§

const FINALIZED_BLOCK_CONSUMER_ID_AUTOMATION: &'static str = "operator_finalized_block_fetcher_automation"

Source§

const FINALIZED_BLOCK_CONSUMER_ID_NO_AUTOMATION: &'static str = "operator_finalized_block_fetcher_no_automation"

Source§

impl<C> NamedEntity for Verifier<C>
where C: CitreaClientT,

Source§

const ENTITY_NAME: &'static str = "verifier"

Source§

const TX_SENDER_CONSUMER_ID: &'static str = "verifier_tx_sender"

Source§

const FINALIZED_BLOCK_CONSUMER_ID_AUTOMATION: &'static str = "verifier_finalized_block_fetcher_automation"

Source§

const FINALIZED_BLOCK_CONSUMER_ID_NO_AUTOMATION: &'static str = "verifier_finalized_block_fetcher_no_automation"