[−][src]Enum xaynet_sdk::StateMachine
PET state machine.
Variants
PET state machine in the "new round" phase
PET state machine in the "awaiting" phase
PET state machine in the "sum" phase
PET state machine in the "update" phase
PET state machine in the "sum2" phase
PET state machine in the "sending sum message" phase
PET state machine in the "sending update message" phase
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]
settings: PetSettings,
xaynet_client: X,
model_store: M,
notifier: N
) -> Self where
X: XaynetClient + Send + 'static,
M: ModelStore + Send + 'static,
N: Notify + Send + 'static,
Instantiate a new PET state machine.
Args
settings
: PET settingsxaynet_client
: a client for communicating with the Xaynet coordinatormodel_store
: a store from which the trained model can be loaded, when the participant is selected for the update tasknotifier
: 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]
state: SerializableState,
xaynet_client: X,
model_store: M,
notifier: N
) -> Self where
X: XaynetClient + Send + 'static,
M: ModelStore + Send + 'static,
N: Notify + Send + 'static,
Restore the PET state machine from the given state
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for StateMachine
[src]
impl Send for StateMachine
[src]
impl !Sync for StateMachine
[src]
impl Unpin for StateMachine
[src]
impl !UnwindSafe for StateMachine
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,