[][src]Enum xaynet_sdk::StateMachine

pub enum StateMachine {
    NewRound(Phase<NewRound>),
    Awaiting(Phase<Awaiting>),
    Sum(Phase<Sum>),
    Update(Phase<Update>),
    Sum2(Phase<Sum2>),
    SendingSum(Phase<SendingSum>),
    SendingUpdate(Phase<SendingUpdate>),
    SendingSum2(Phase<SendingSum2>),
}

PET state machine.

Variants

NewRound(Phase<NewRound>)

PET state machine in the "new round" phase

Awaiting(Phase<Awaiting>)

PET state machine in the "awaiting" phase

Sum(Phase<Sum>)

PET state machine in the "sum" phase

Update(Phase<Update>)

PET state machine in the "update" phase

Sum2(Phase<Sum2>)

PET state machine in the "sum2" phase

SendingSum(Phase<SendingSum>)

PET state machine in the "sending sum message" phase

SendingUpdate(Phase<SendingUpdate>)

PET state machine in the "sending update message" phase

SendingSum2(Phase<SendingSum2>)

PET state machine in the "sending sum2 message" phase

Implementations

impl StateMachine[src]

pub async fn transition(self) -> TransitionOutcome[src]

Try to make progress in the PET protocol

pub fn save(self) -> SerializableState[src]

Convert the state machine into a serializable data structure so that it can be saved.

pub fn local_model_config(&self) -> LocalModelConfig[src]

Return the local model configuration of the model that is expected in the update phase.

impl StateMachine[src]

pub fn new<X, M, N>(
    settings: PetSettings,
    xaynet_client: X,
    model_store: M,
    notifier: N
) -> Self where
    X: XaynetClient + Send + 'static,
    M: ModelStore + Send + 'static,
    N: Notify + Send + 'static, 
[src]

Instantiate a new PET state machine.

Args

  • settings: PET settings
  • xaynet_client: a client for communicating with the Xaynet coordinator
  • model_store: a store from which the trained model can be loaded, when the participant is selected for the update task
  • notifier: a type that the state machine can use to emit notifications

pub fn restore<X, M, N>(
    state: SerializableState,
    xaynet_client: X,
    model_store: M,
    notifier: N
) -> Self where
    X: XaynetClient + Send + 'static,
    M: ModelStore + Send + 'static,
    N: Notify + Send + 'static, 
[src]

Restore the PET state machine from the given state.

Trait Implementations

impl Debug for StateMachine[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,