pub enum ForeignState<'a> {
Raw {
format: PluginFormat,
source_key: Option<&'a str>,
bytes: &'a [u8],
},
MismatchedEnvelope {
plugin_id_hash: u64,
params: &'a [(u32, f64)],
extra: Option<&'a [u8]>,
},
}Expand description
What a format wrapper found where truce state should have been.
Handed to crate::plugin::PluginRuntime::migrate_state on the
host thread; the plugin decides whether it recognizes the bytes.
Variants§
Raw
Bytes that aren’t a truce envelope: a previous framework’s state, exactly as the old build saved it.
Fields
§
format: PluginFormatMismatchedEnvelope
A valid truce envelope whose plugin_id_hash doesn’t match:
the plugin was renamed / re-identified. Params are already
decoded; the plugin only decides whether to accept them.
Auto Trait Implementations§
impl<'a> Freeze for ForeignState<'a>
impl<'a> RefUnwindSafe for ForeignState<'a>
impl<'a> Send for ForeignState<'a>
impl<'a> Sync for ForeignState<'a>
impl<'a> Unpin for ForeignState<'a>
impl<'a> UnsafeUnpin for ForeignState<'a>
impl<'a> UnwindSafe for ForeignState<'a>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more