Struct FnHooks
pub struct FnHooks { /* private fields */ }Expand description
A product’s state hooks as function pointers, so format adapters can keep them without being generic over the product.
Implementations§
§impl FnHooks
impl FnHooks
pub fn of<P: PluginExport>() -> Self
pub fn of<P: PluginExport>() -> Self
The hooks of export P.
Trait Implementations§
impl Copy for FnHooks
§impl StateHooks for FnHooks
impl StateHooks for FnHooks
§fn migrate(&self, saved: &mut SavedState) -> Result<(), StateError>
fn migrate(&self, saved: &mut SavedState) -> Result<(), StateError>
Update state written by an earlier product state version. On return,
parameters are matched to the current product by ID: unknown IDs are
dropped and missing ones take defaults.
§fn import(&self, bytes: &[u8]) -> Option<SavedState>
fn import(&self, bytes: &[u8]) -> Option<SavedState>
Convert data without the RAVET magic, for example sessions written by an
earlier framework. Return
None to reject it. The result is treated as
the current product state version.Auto Trait Implementations§
impl Freeze for FnHooks
impl RefUnwindSafe for FnHooks
impl Send for FnHooks
impl Sync for FnHooks
impl Unpin for FnHooks
impl UnsafeUnpin for FnHooks
impl UnwindSafe for FnHooks
Blanket Implementations§
impl<T> AutoreleaseSafe for T
§impl<T> BorrowMut<T> for T
impl<T> BorrowMut<T> for T
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more