Skip to main content

SettingsHandler

Trait SettingsHandler 

Source
pub trait SettingsHandler {
    // Provided methods
    fn begin_save_session(&mut self) { ... }
    fn end_save_session(&mut self) { ... }
    fn save_settings(&mut self, _data: &[u8], _reason: SaveReasonFlags) -> bool { ... }
    fn load_settings(&mut self) -> Option<Vec<u8>> { ... }
    fn save_node_settings(
        &mut self,
        _node: NodeId,
        _data: &[u8],
        _reason: SaveReasonFlags,
    ) -> bool { ... }
    fn load_node_settings(&mut self, _node: NodeId) -> Option<Vec<u8>> { ... }
}
Expand description

User-defined persistence hooks for an editor context.

The handler is owned by EditorContext, so every callback remains valid until the native editor has been destroyed.

Provided Methods§

Source

fn begin_save_session(&mut self)

Source

fn end_save_session(&mut self)

Source

fn save_settings(&mut self, _data: &[u8], _reason: SaveReasonFlags) -> bool

Source

fn load_settings(&mut self) -> Option<Vec<u8>>

Source

fn save_node_settings( &mut self, _node: NodeId, _data: &[u8], _reason: SaveReasonFlags, ) -> bool

Source

fn load_node_settings(&mut self, _node: NodeId) -> Option<Vec<u8>>

Implementors§