pub enum State {
Show 13 variants
Prepare(PrepareData),
Stage(StageData),
Fetch(FetchData),
Commit(CommitData),
WaitToReboot(WaitToRebootData),
Reboot(RebootData),
DeferReboot(DeferRebootData),
Complete(CompleteData),
FailPrepare(FailPrepareData),
FailStage(FailStageData),
FailFetch(FailFetchData),
FailCommit(FailCommitData),
Canceled(CanceledData),
}Expand description
The set of states that a [Monitor] can receive during an update
installation attempt.
An installation attempt ends when it enters a terminal state, denoted below as the states on the right-hand side of the diagram with no arrows leading out of them.
§State Machine Diagram
+----------------+ +----------------+
+----------| prepare |---->| fail_prepare |
| +----------------+ +----------------+
| |
| v
| +----------------+ +----------------+
+----------| stage |---->| fail_stage |
| +----------------+ +----------------+
| |
| v
| +----------------+ +----------------+
+----------| fetch |---->| fail_fetch |
| +----------------+ +----------------+
| |
| v
| +----------------+ +----------------+
+----------| commit |---->| fail_commit |
| +----------------+ +----------------+
v |
+----------------+ | +----------------+
| canceled | +------------> | complete |
+----------------+ | +----------------+
v
+----------------+ +----------------+
| wait_to_reboot |---->| defer_reboot |
+----------------+ +----------------+
|
| +----------------+
+------------->| reboot |
+----------------+Variants§
Prepare(PrepareData)
Fetching required metadata to begin the update and verifying system state.
Next States:
stagesystem is ready to install the update.fail_prepareon error.canceledon cancel.
Stage(StageData)
Fetching and writing kernel and firmware images.
Next States:
fetchrequired kernel and firmware images are written.fail_stageon error.canceledon cancel.
Fetch(FetchData)
Fetching packages.
Next States:
commitpackages were fetched successfully.fail_fetchon error.canceledon cancel.
Commit(CommitData)
Prepare to switch over to the new system by writing the packages and switching the active partition.
Next States:
wait_to_rebootif a reboot is necessary to complete the update.completeif no reboot is necessary to complete the update.fail_commiton error.canceledon cancel.
WaitToReboot(WaitToRebootData)
The system is configured to boot the updated OS on next boot, and the installer is waiting for the trigger to reboot the system.
Next States:
rebootwhen the installer decides it is time to initiate the reboot.defer_rebootif the initiator specifically requests to not reboot.
Reboot(RebootData)
The installer has initiated a system reboot into the updated OS.
This is a terminal state
DeferReboot(DeferRebootData)
The initiator specifically requested to skip the reboot, but a reboot is still required to complete the update.
This is a terminal state
Complete(CompleteData)
The update is complete and no reboot was required.
This is a terminal state
FailPrepare(FailPrepareData)
An error occurred while preparing the install.
This is a terminal state
FailStage(FailStageData)
An error occurred while staging the images for the OS.
This is a terminal state
FailFetch(FailFetchData)
An error occurred while fetching the required artifacts.
This is a terminal state
FailCommit(FailCommitData)
An error occured while switching partitions.
This is a terminal state
Canceled(CanceledData)
The update is canceled.
This is a terminal state
Implementations§
Trait Implementations§
Source§impl<D> Decode<State, D> for Statewhere
D: ResourceDialect,
impl<D> Decode<State, D> for Statewhere
D: ResourceDialect,
Source§impl TypeMarker for State
impl TypeMarker for State
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for State
impl ValueTypeMarker for State
Source§type Borrowed<'a> = &'a State
type Borrowed<'a> = &'a State
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<State as TypeMarker>::Owned,
) -> <State as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<State as TypeMarker>::Owned, ) -> <State as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.impl Persistable for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
Blanket Implementations§
Source§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
Source§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
Source§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]