pub trait NodeControl {
// Required methods
fn stop_component(&mut self) -> Result<(), String>;
fn stage(&mut self, candidate: &CandidateBytes) -> Result<(), String>;
fn start_component(&mut self) -> Result<(), StartFailure>;
fn witness_mailbox(&mut self) -> Result<(), String>;
fn witness_content(&mut self) -> Result<(), String>;
fn report(
&mut self,
build_generation: u64,
content_digest: [u8; 32],
) -> Result<GenerationReport, String>;
}Expand description
The node operations the barrier drives, in the only order it drives them. Every method is one observable step; the implementation maps its substrate errors to the step’s typed detail.
Required Methods§
Sourcefn stop_component(&mut self) -> Result<(), String>
fn stop_component(&mut self) -> Result<(), String>
Ordered stop of the component: drains admitted old work, awaits
the tree’s tombstones. After Ok, nothing runs old code.
§Errors
The substrate’s typed stop failure, rendered.
Sourcefn stage(&mut self, candidate: &CandidateBytes) -> Result<(), String>
fn stage(&mut self, candidate: &CandidateBytes) -> Result<(), String>
Purges retained old module code and stages these bytes for the next start (the registry staging seam + support-module staging).
§Errors
The typed purge/staging refusal, rendered — a purge refusal is the drain-failure signal.
Sourcefn start_component(&mut self) -> Result<(), StartFailure>
fn start_component(&mut self) -> Result<(), StartFailure>
Starts the component tree from the staged bytes.
§Errors
StartFailure::Load for byte admission, StartFailure::Tree
for a tree that did not come up.
Sourcefn witness_mailbox(&mut self) -> Result<(), String>
fn witness_mailbox(&mut self) -> Result<(), String>
The mailbox liveness round-trip against the live tree.
§Errors
The witness’s typed failure, rendered.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".