pub trait MenuSerializableShortcut: Debug {
// Required method
fn serialize_for_menu(&self) -> ShortcutSerialization;
}Expand description
A mixin allowing a ShortcutActivator to provide data for serialization of the shortcut
when sending to the platform.
This is meant for those who have written their own ShortcutActivator implementor, and
would like to have it work for menus in a PlatformMenuBar as well.
Keep in mind that there are limits to the capabilities of the platform APIs, and not all
kinds of ShortcutActivators will work with them.
Required Methods§
Implement this in a ShortcutActivator implementor to allow it to be serialized for use
in a PlatformMenuBar.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".