[][src]Trait xaynet::services::fetchers::Fetcher

pub trait Fetcher {
#[must_use]    fn round_params<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<RoundParamsResponse, FetchError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn mask_length<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<MaskLengthResponse, FetchError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn scalar<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<ScalarResponse, FetchError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn model<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<ModelResponse, FetchError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn seed_dict<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<SeedDictResponse, FetchError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn sum_dict<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<SumDictResponse, FetchError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

A single interface for retrieving data from the coordinator.

Required methods

#[must_use]fn round_params<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<RoundParamsResponse, FetchError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Fetch the parameters for the current round

#[must_use]fn mask_length<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<MaskLengthResponse, FetchError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Fetch the mask length for the current round. The sum participants need this value during the sum2 phase to derive masks from the update participant's masking seeds.

#[must_use]fn scalar<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<ScalarResponse, FetchError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Fetch the scalar used for aggregation for the current round. The update participants need this value to mask the model they trained.

#[must_use]fn model<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<ModelResponse, FetchError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Fetch the latest global model.

#[must_use]fn seed_dict<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<SeedDictResponse, FetchError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Fetch the global seed dictionary. Each sum2 participant needs a different portion of that dictionary.

#[must_use]fn sum_dict<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<SumDictResponse, FetchError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Fetch the sum dictionary. The update participants need this dictionary to encrypt their masking seed for each sum participant.

Loading content...

Implementors

impl<RoundParams, SumDict, SeedDict, MaskLength, Scalar, Model> Fetcher for FetcherService<RoundParams, SumDict, SeedDict, MaskLength, Scalar, Model> where
    Self: Clone + Send + Sync + 'static + Service<RoundParamsRequest, Response = RoundParameters> + Service<MaskLengthRequest, Response = MaskLengthResponse> + Service<ScalarRequest, Response = ScalarResponse> + Service<ModelRequest, Response = ModelResponse> + Service<SeedDictRequest, Response = SeedDictResponse> + Service<SumDictRequest, Response = SumDictResponse>,
    Self::Future: Send + Sync + 'static,
    Self::Error: Into<Box<dyn Error + Sync + Send + 'static>>,
    Self::Future: Send + Sync + 'static,
    Self::Error: Into<Box<dyn Error + Sync + Send + 'static>>,
    Self::Future: Send + Sync + 'static,
    Self::Error: Into<Box<dyn Error + Sync + Send + 'static>>,
    Self::Future: Send + Sync + 'static,
    Self::Error: Into<Box<dyn Error + Sync + Send + 'static>>,
    Self::Future: Send + Sync + 'static,
    Self::Error: Into<Box<dyn Error + Sync + Send + 'static>>,
    Self::Future: Send + Sync + 'static,
    Self::Error: Into<Box<dyn Error + Sync + Send + 'static>>, 
[src]

Loading content...