GadgetServicesClient

Trait GadgetServicesClient 

Source
pub trait GadgetServicesClient:
    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
    fn get_operators<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<OperatorSet<Self::PublicAccountIdentity, Self::PublicApplicationIdentity>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn operator_id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::PublicApplicationIdentity, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn blueprint_id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Id, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn get_operators_and_operator_id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(OperatorSet<usize, Self::PublicApplicationIdentity>, usize), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_operator_index<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

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

fn get_operators<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<OperatorSet<Self::PublicAccountIdentity, Self::PublicApplicationIdentity>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the set of operators for the current job

Source

fn operator_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::PublicApplicationIdentity, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the ID of the operator

Source

fn blueprint_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Id, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the unique ID for this blueprint

Provided Methods§

Source

fn get_operators_and_operator_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(OperatorSet<usize, Self::PublicApplicationIdentity>, usize), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn get_operator_index<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the index of the current operator in the operator set

Implementations on Foreign Types§

Source§

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

Source§

type PublicApplicationIdentity = <T as GadgetServicesClient>::PublicApplicationIdentity

Source§

type PublicAccountIdentity = <T as GadgetServicesClient>::PublicAccountIdentity

Source§

type Id = <T as GadgetServicesClient>::Id

Source§

type Error = <T as GadgetServicesClient>::Error

Source§

fn get_operators<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<OperatorSet<Self::PublicAccountIdentity, Self::PublicApplicationIdentity>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn operator_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::PublicApplicationIdentity, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn blueprint_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Id, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_operators_and_operator_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(OperatorSet<usize, Self::PublicApplicationIdentity>, usize), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_operator_index<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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

Source§

type PublicApplicationIdentity = <T as GadgetServicesClient>::PublicApplicationIdentity

Source§

type PublicAccountIdentity = <T as GadgetServicesClient>::PublicAccountIdentity

Source§

type Id = <T as GadgetServicesClient>::Id

Source§

type Error = <T as GadgetServicesClient>::Error

Source§

fn get_operators<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<OperatorSet<Self::PublicAccountIdentity, Self::PublicApplicationIdentity>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn operator_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::PublicApplicationIdentity, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn blueprint_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Id, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_operators_and_operator_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(OperatorSet<usize, Self::PublicApplicationIdentity>, usize), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_operator_index<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§