BlueprintServicesClient

Trait BlueprintServicesClient 

Source
pub trait BlueprintServicesClient:
    Send
    + Sync
    + 'static {
    type PublicApplicationIdentity: Eq + PartialEq + Hash + Ord + PartialOrd + Send + Sync + 'static;
    type PublicAccountIdentity: Send + Sync + 'static;
    type Id: Send + Sync + 'static;
    type Error: Error + From<Error> + Send + Sync + 'static;

    // Required methods
    async fn get_operators(
        &self,
    ) -> Result<OperatorSet<Self::PublicAccountIdentity, Self::PublicApplicationIdentity>, Self::Error>;
    async fn operator_id(
        &self,
    ) -> Result<Self::PublicApplicationIdentity, Self::Error>;
    async fn blueprint_id(&self) -> Result<Self::Id, Self::Error>;

    // Provided methods
    async fn get_operators_and_operator_id(
        &self,
    ) -> Result<(OperatorSet<usize, Self::PublicApplicationIdentity>, usize), Self::Error> { ... }
    async fn get_operator_index(&self) -> Result<usize, Self::Error> { ... }
}

Required Associated Types§

Source

type PublicApplicationIdentity: Eq + PartialEq + Hash + Ord + PartialOrd + Send + Sync + 'static

The ID of for operators at the blueprint/application layer. Typically a cryptograpgic key in the form of a point on some elliptic curve, e.g., an ECDSA public key (point). However, this is not required.

Source

type PublicAccountIdentity: Send + Sync + 'static

The ID of the operator’s account, not necessarily associated with the PublicApplicationIdentity, but may be cryptographically related thereto. E.g., AccountId32

Source

type Id: Send + Sync + 'static

A generalized ID that distinguishes the current blueprint from others

Source

type Error: Error + From<Error> + Send + Sync + 'static

Required Methods§

Source

async fn get_operators( &self, ) -> Result<OperatorSet<Self::PublicAccountIdentity, Self::PublicApplicationIdentity>, Self::Error>

Returns the set of operators for the current job

Source

async fn operator_id( &self, ) -> Result<Self::PublicApplicationIdentity, Self::Error>

Returns the ID of the operator

Source

async fn blueprint_id(&self) -> Result<Self::Id, Self::Error>

Returns the unique ID for this blueprint

Provided Methods§

Source

async fn get_operators_and_operator_id( &self, ) -> Result<(OperatorSet<usize, Self::PublicApplicationIdentity>, usize), Self::Error>

Returns an operator set with the index of the current operator within that set

Source

async fn get_operator_index(&self) -> Result<usize, Self::Error>

Returns the index of the current operator in the operator set

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.

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + BlueprintServicesClient + ?Sized> BlueprintServicesClient for &'a T
where &'a T: Send + Sync + 'static,

Source§

impl<T: BlueprintServicesClient + ?Sized> BlueprintServicesClient for Arc<T>
where Arc<T>: Send + Sync + 'static,

Implementors§