Skip to main content

ReloadApply

Trait ReloadApply 

pub trait ReloadApply: Send + Sync {
    // Required method
    fn apply(&self);
}
Expand description

Infallible publication, run once, only after every listener prepared successfully: what a listener’s prepare hands back. A later server table refusal leaves the old engine generation in place, but cannot undo this callback’s own effects. One per listener per reload, never per tick; <dyn ReloadApply>::new(move || ...) makes one from a closure.

Required Methods§

fn apply(&self)

Publish the prepared state.

Implementations§

§

impl dyn ReloadApply

pub fn new(apply: impl FnOnce() + Send + 'static) -> Box<dyn ReloadApply>

Capture newly parsed state without publishing it yet.

Trait Implementations§

§

impl Wire for Box<dyn ReloadApply>

§

const MIN: usize = 8

Minimum encoded size, used to reject impossible collection lengths.
§

fn put(&self, out: &mut Writer)

Encodes this value, recording failures on the writer.
§

fn put_owned(self, out: &mut Writer)

Consumes owned data when a resource’s ownership must cross the boundary.
§

fn take(input: &mut Reader<'_>) -> Result<Box<dyn ReloadApply>, WireError>

Decodes one value, leaving any following bytes for the caller.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§