[][src]Trait xaynet_sdk::XaynetClient

pub trait XaynetClient {
    type Error: Error;
#[must_use]    pub fn get_round_params<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<RoundParameters, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn get_sums<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Option<SumDict>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn get_seeds<'life0, 'async_trait>(
        &'life0 mut self,
        pk: SumParticipantPublicKey
    ) -> Pin<Box<dyn Future<Output = Result<Option<UpdateSeedDict>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn get_model<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Option<Model>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn send_message<'life0, 'async_trait>(
        &'life0 mut self,
        msg: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

A trait used by the StateMachine to communicate with the Xaynet coordinator.

Associated Types

Loading content...

Required methods

#[must_use]pub fn get_round_params<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<RoundParameters, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Retrieve the current round parameters

#[must_use]pub fn get_sums<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<SumDict>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Retrieve the current sum dictionary, if available.

#[must_use]pub fn get_seeds<'life0, 'async_trait>(
    &'life0 mut self,
    pk: SumParticipantPublicKey
) -> Pin<Box<dyn Future<Output = Result<Option<UpdateSeedDict>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Retrieve the current seed dictionary for the given sum participant, if available.

#[must_use]pub fn get_model<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<Model>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Retrieve the current global model, if available.

#[must_use]pub fn send_message<'life0, 'async_trait>(
    &'life0 mut self,
    msg: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Send an encrypted and signed PET message to the coordinator.

Loading content...

Implementors

impl<C> XaynetClient for Client<C> where
    C: XaynetHttpClient + Send
[src]

type Error = ClientError

Loading content...